{"version":3,"file":"CMS_ItemCounter.Dxt5F2vL.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/mBaWVmyDMAL64YekpskS/97pIvhJUzlIQrQE2dsLP/CMS_ItemCounter.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function ItemCounter({jsonUrl,selectedGroup,fontSize,fontColor}){const[data,setData]=useState({});useEffect(()=>{// Fetch the JSON file from the provided URL\nfetch(jsonUrl).then(response=>response.json()).then(jsonData=>{setData(jsonData);});},[jsonUrl]);// Filter items by the selected group\nconst count=Object.keys(data).filter(slug=>slug.startsWith(selectedGroup)).length;// Styling for the text with hardcoded font values\nconst textStyle={fontFamily:\"STK Bureau\",fontSize:\"12px\",fontStyle:\"normal\",fontWeight:430,lineHeight:\"14px\",letterSpacing:\"-0.12px\",color:\"#FF6300\"};return /*#__PURE__*/_jsx(\"div\",{style:textStyle,children:`${count}`});}// Property Controls for Framer UI\naddPropertyControls(ItemCounter,{jsonUrl:{type:ControlType.String,title:\"JSON URL\",defaultValue:\"https://framerusercontent.com/sites/01RKAeMiUuyrRsoKZoMXWV/searchIndex-1OPF8z-puWTA.json\"},selectedGroup:{type:ControlType.Enum,title:\"Select Group\",options:[\"/guides\",\"/blog\",\"/news\",\"/webinar\",\"/academy\",\"/customer-stories\",\"/event\",\"/go/changelog\",\"/darwin/changelog\",\"/go/automations\"],defaultValue:\"/customer-stories\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"ItemCounter\":{\"type\":\"reactComponent\",\"name\":\"ItemCounter\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CMS_ItemCounter.map"],"mappings":"0QAAqI,SAAgB,EAAY,CAAC,UAAQ,gBAAc,WAAS,aAAW,CAAC,GAAK,CAAC,EAAK,GAASA,EAAS,EAAE,CAAC,CAAC,MAAc,CAC5P,MAAM,EAAQ,CAAC,KAAK,GAAU,EAAS,MAAM,CAAC,CAAC,KAAK,GAAU,CAAC,EAAQ,EAAS,EAAG,EAAG,CAAC,EAAQ,CAAC,CAChG,IAAM,EAAM,OAAO,KAAK,EAAK,CAAC,OAAO,GAAM,EAAK,WAAW,EAAc,CAAC,CAAC,OAC2E,OAAoB,EAAK,MAAM,CAAC,MAAtK,CAAC,WAAW,aAAa,SAAS,OAAO,UAAU,SAAS,WAAW,IAAI,WAAW,OAAO,cAAc,UAAU,MAAM,UAAU,CAAiD,SAAS,GAAG,IAAQ,CAAC,kBAHhL,IAAsC,IAAoD,CAIrI,EAAoB,EAAY,CAAC,QAAQ,CAAC,KAAK,EAAY,OAAO,MAAM,WAAW,aAAa,2FAA2F,CAAC,cAAc,CAAC,KAAK,EAAY,KAAK,MAAM,eAAe,QAAQ,CAAC,UAAU,QAAQ,QAAQ,WAAW,WAAW,oBAAoB,SAAS,gBAAgB,oBAAoB,kBAAkB,CAAC,aAAa,oBAAoB,CAAC,CAAC"}