{"version":3,"file":"ReadTimeCalculator_1.CSweb70q.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/QALpoeOSWAFfAxekCjWj/KKnvBJ1zAPUXS183mzny/ReadTimeCalculator_1.js"],"sourcesContent":["// Component that calculates and displays the estimated read time of an article in minutes\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useMemo}from\"react\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function ReadTimeCalculator(props){const{text,wordsPerMinute,prefix,suffix,textColor,backgroundColor,font,borderRadius,padding,showIcon,iconSize}=props;const readTime=useMemo(()=>{if(!text||text.trim().length===0)return 0;const words=text.trim().split(/\\s+/).length;const minutes=Math.ceil(words/wordsPerMinute);return minutes;},[text,wordsPerMinute]);return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",display:\"inline-flex\",alignItems:\"center\",justifyContent:\"center\",gap:6,backgroundColor,color:textColor,borderRadius,padding,width:\"max-content\",...font},children:[showIcon&&/*#__PURE__*/_jsxs(\"svg\",{width:iconSize,height:iconSize,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"2\",strokeLinecap:\"round\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"circle\",{cx:\"12\",cy:\"12\",r:\"10\"}),/*#__PURE__*/_jsx(\"polyline\",{points:\"12 6 12 12 16 14\"})]}),/*#__PURE__*/_jsxs(\"span\",{children:[prefix,readTime,suffix]})]});}addPropertyControls(ReadTimeCalculator,{text:{type:ControlType.String,title:\"Article Text\",displayTextArea:true,defaultValue:\"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\"},wordsPerMinute:{type:ControlType.Number,title:\"Words/Min\",defaultValue:200,min:100,max:400,step:10},prefix:{type:ControlType.String,title:\"Prefix\",defaultValue:\"\"},suffix:{type:ControlType.String,title:\"Suffix\",defaultValue:\" min read\"},showIcon:{type:ControlType.Boolean,title:\"Show Icon\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},iconSize:{type:ControlType.Number,title:\"Icon Size\",defaultValue:14,min:8,max:32,step:1,hidden:({showIcon})=>!showIcon},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#F5F5F5\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1em\"}},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:8,min:0,max:32},padding:{type:ControlType.Number,title:\"Padding\",defaultValue:8,min:0,max:32}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ReadTimeCalculator\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ReadTimeCalculator_1.map"],"mappings":"kLAIG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,OAAK,iBAAe,SAAO,SAAO,YAAU,kBAAgB,OAAK,eAAa,UAAQ,WAAS,YAAU,EAAY,EAASA,MAAY,CAAC,GAAG,CAAC,GAAM,EAAK,MAAM,CAAC,SAAS,EAAE,MAAO,GAAE,IAAM,EAAM,EAAK,MAAM,CAAC,MAAM,MAAM,CAAC,OAAqD,OAAhC,KAAK,KAAK,EAAM,EAAe,EAAkB,CAAC,EAAK,EAAe,CAAC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