{"version":3,"file":"Counter.BugJUcFL.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/FfPrO1eLhBnV4R3S3mYp/8w7gZMomvViWYcdvCfNI/Counter.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";function ProgressWithCounter(props){const{fontSize,font,textColor,borderColor,backgroundColor,progressColor,padding,textAlign,ticketPrice,ticketText,progress}=props;const[currentProgress,setCurrentProgress]=useState(progress||0);function getFontStyle(fontProp=null){if(!fontProp)return{};if(typeof fontProp===\"string\")return{fontFamily:fontProp};const family=fontProp.family||fontProp.fontFamily||fontProp.name||fontProp.value;const weight=fontProp.weight||fontProp.fontWeight||fontProp.style&&parseInt(fontProp.style)||undefined;const style=fontProp.style||fontProp.fontStyle||undefined;const styleObj={};if(family)styleObj.fontFamily=family;if(weight)styleObj.fontWeight=weight;if(style)styleObj.fontStyle=style;return styleObj;}useEffect(()=>{setCurrentProgress(progress);},[progress]);const ticketsSold=Math.round(currentProgress);const fontStyles=getFontStyle(font);return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",maxWidth:600},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:20,background:backgroundColor,borderRadius:24,border:`2px solid ${borderColor}`,overflow:\"hidden\",padding:padding},children:/*#__PURE__*/_jsx(motion.div,{style:{height:\"100%\",background:progressColor,borderRadius:20},animate:{width:`${currentProgress}%`},transition:{duration:1}})}),/*#__PURE__*/_jsxs(\"p\",{style:{marginTop:12,fontSize:fontSize,fontWeight:700,color:textColor,marginBottom:0,textAlign:textAlign,...fontStyles},children:[ticketsSold,\"% \",ticketText,\" \",/*#__PURE__*/_jsxs(\"span\",{style:{color:progressColor,...fontStyles},children:[\"R$ \",ticketPrice]})]})]});}ProgressWithCounter.defaultProps={fontSize:20,font:\"Arial\",textColor:\"#FFFFFF\",borderColor:\"#FFD700\",backgroundColor:\"#2a2a2a\",progressColor:\"#FFD700\",padding:4,textAlign:\"left\",ticketPrice:\"54,00\",ticketText:\"dos ingressos vendidos a\",progress:97};addPropertyControls(ProgressWithCounter,{fontSize:{type:ControlType.Number,title:\"Tamanho da Fonte\",min:8,max:72,step:1},font:{type:ControlType.Font,title:\"Tipografia\"},textColor:{type:ControlType.Color,title:\"Cor do Texto\"},borderColor:{type:ControlType.Color,title:\"Cor da Borda\"},backgroundColor:{type:ControlType.Color,title:\"Cor do Fundo\"},progressColor:{type:ControlType.Color,title:\"Cor da Barra\"},padding:{type:ControlType.Number,title:\"Padding Interno\",min:0,max:20,step:1},textAlign:{type:ControlType.Enum,title:\"Alinhamento do Texto\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Esquerda\",\"Centro\",\"Direita\"]},ticketText:{type:ControlType.String,title:\"Texto do Ingresso\",defaultValue:\"dos ingressos vendidos a\"}});export default ProgressWithCounter;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProgressWithCounter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Counter.map"],"mappings":"0OAAqL,SAAS,EAAoB,EAAM,CAAC,GAAK,CAAC,WAAS,OAAK,YAAU,cAAY,kBAAgB,gBAAc,UAAQ,YAAU,cAAY,aAAW,YAAU,EAAW,CAAC,EAAgB,GAAoBA,EAAS,GAAU,EAAE,CAAC,SAAS,EAAa,EAAS,KAAK,CAAC,GAAG,CAAC,EAAS,MAAM,EAAE,CAAC,GAAG,OAAO,GAAW,SAAS,MAAM,CAAC,WAAW,EAAS,CAAC,IAAM,EAAO,EAAS,QAAQ,EAAS,YAAY,EAAS,MAAM,EAAS,MAAY,EAAO,EAAS,QAAQ,EAAS,YAAY,EAAS,OAAO,SAAS,EAAS,MAAM,EAAE,IAAA,GAAgB,EAAM,EAAS,OAAO,EAAS,WAAW,IAAA,GAAgB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