{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/L21oPRpPlLtefnrR8aCf/nydzO0KRJQZy6qcZmdUB/ReadingTime.js"],
  "sourcesContent": ["/**\n * Reading Time V1\n * By Matias Fernandez\n *\n * at mattimelgarejo\n *\n *\n *\n */import{jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n */export default function ReadingTime(props){const{text,readingType,language,style,textColor}=props;const calculateReadingTime=(text,readingType)=>{let wordsPerMinute;if(readingType===\"Talk Time\"){wordsPerMinute=200// Palabras por minuto durante el discurso\n;}else{wordsPerMinute=300// Palabras por minuto durante la lectura en silencio\n;}if(!text)return 0// Si no hay texto, retornar 0 minutos\n;const words=text.trim().split(/\\s+/).length;const readingTime=Math.ceil(words/wordsPerMinute);return readingTime;};const readingTime=calculateReadingTime(text,readingType);const minutesText=language===\"English\"?readingTime===1?\"minute\":\"minutes\":readingTime===1?\"minuto\":\"minutos\";return /*#__PURE__*/_jsxs(\"p\",{style:{...props.style,color:props.textColor,margin:0},children:[readingTime,\" \",minutesText]});}ReadingTime.defaultProps={text:\"\",readingType:\"Talk Time\",language:\"English\"};addPropertyControls(ReadingTime,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"\",placeholder:\"Write or paste your text here...\",displayTextArea:true,hidden(props){return props.displayTextArea===false;}},readingType:{type:ControlType.Enum,title:\"Reading type\",options:[\"Talk Time\",\"Silent Reading Time\"],defaultValue:\"Talk Time\",description:\"Talk Time: 200 wpm / Silent Reading Time: 300 wpm\"},language:{type:ControlType.Enum,title:\"Language\",options:[\"English\",\"Spanish\"],defaultValue:\"English\",displaySegmentedControl:true},style:{type:ControlType.Font,title:\"Style\",controls:\"extended\",displayTextAlignment:false},textColor:{title:\"Color\",type:ControlType.Color,defaultValue:\"#000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ReadingTime\",\"slots\":[],\"annotations\":{\"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U,CAAC,MAAM,QAAQ,KAAKA,EAAY,MAAM,aAAa,MAAM,CAAC,CAAC",
  "names": ["ReadingTime", "props", "text", "readingType", "language", "style", "textColor", "readingTime", "wordsPerMinute", "words", "minutesText", "u", "addPropertyControls", "ControlType"]
}
