{"version":3,"file":"CurrentChartNumber.DCOSFlfK.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/apR2Pv7RvoiE7VRMUBNz/YLPZmt2NCVPWAkAPU6by/CurrentChartNumber.js"],"sourcesContent":["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/components/auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function CurrentChartNumber(props){const{textSize,selectedFont,textColor,lineHeight}=props;// This is a React component containing an Example component\n// Replace <Example /> with your own cod\nconst[number,setNumber]=useState(104524);useEffect(()=>{const getNumbers=async()=>{const req=await fetch(\"https://codesoflife.com/api/admin/dashboard\",{method:\"POST\",body:JSON.stringify({xAdminToken:\"07da4cebbbebbc515ce3582be912b91267f4d6d6\"})});const{charts}=req.ok?await req.json():{charts:0};setNumber(charts.toLocaleString());};getNumbers();},[]);return /*#__PURE__*/_jsx(\"span\",{style:{fontSize:`${textSize}px`,fontFamily:selectedFont.fontFamily,fontWeight:selectedFont.fontWeight,color:textColor,lineHeight:`${lineHeight}px`},children:number});}// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",overflow:\"hidden\"};CurrentChartNumber.defaultProps={textSize:16,selectedFont:{fontFamily:\"Montserrat\",fontWeight:500,systemFont:true},lineHeight:15,textColor:\"#000000\"};addPropertyControls(CurrentChartNumber,{selectedFont:{title:\"Font\",type:ControlType.Font,defaultValue:{fontFamily:\"Inter\",fontWeight:500,systemFont:true}},textSize:{title:\"Font Size\",type:ControlType.Number,min:8,max:240,step:1},lineHeight:{title:\"Line Height\",type:ControlType.Number,min:8,max:240,step:1},textColor:{type:ControlType.Color,title:\"Font Color\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CurrentChartNumber\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CurrentChartNumber.map"],"mappings":"0QAQG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,WAAS,eAAa,YAAU,aAAW,CAAC,EAElG,CAAC,EAAO,EAAU,CAACA,EAAS,QAA8T,OAAtT,MAAc,CAAC,IAAM,EAAW,SAAS,CAAC,IAAM,EAAI,MAAM,MAAM,8CAA8C,CAAC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC,YAAY,2CAA2C,EAAE,EAAO,CAAC,SAAO,CAAC,EAAI,GAAG,MAAM,EAAI,OAAO,CAAC,OAAO,EAAE,CAAC,EAAU,EAAO,iBAAmB,EAAC,GAAc,EAAC,EAAE,EAAsB,EAAK,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,EAAS,IAAI,WAAW,EAAa,WAAW,WAAW,EAAa,WAAW,MAAM,EAAU,WAAW,GAAG,EAAW,IAAI,CAAC,SAAS,EAAO,CAAG,2BAErb,EAAmB,aAAa,CAAC,SAAS,GAAG,aAAa,CAAC,WAAW,aAAa,WAAW,IAAI,WAAW,GAAK,CAAC,WAAW,GAAG,UAAU,UAAU,CAAC,EAAoB,EAAmB,CAAC,aAAa,CAAC,MAAM,OAAO,KAAK,EAAY,KAAK,aAAa,CAAC,WAAW,QAAQ,WAAW,IAAI,WAAW,GAAK,CAAC,CAAC,SAAS,CAAC,MAAM,YAAY,KAAK,EAAY,OAAO,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,CAAC,WAAW,CAAC,MAAM,cAAc,KAAK,EAAY,OAAO,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,KAAK,EAAY,MAAM,MAAM,aAAa,CAAC"}