{"version":3,"file":"CMSWithFilterQueryStringVariant.CoqeYhj5.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/2sYzQPChs70letMSjGg3/RDXWp18rqIy6N7s4MCKv/CMSWithFilterQueryStringVariant.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useState}from\"react\";export function detectVariantFromQueryString(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const[variant,setVariant]=useState(null);useEffect(()=>{const params=new URLSearchParams(window.location.search);const value=params.get(\"filter\");setVariant(value);},[]);function handleClick(...args){window.posthog?.capture(\"cta_pressed\",{name:props.title??props.text??props.children??\"unknown_cta\",page_path:window.location.pathname,page_url:window.location.href});props.onClick?.(...args);}return /*#__PURE__*/_jsx(Component,{ref:ref,...props,variant:variant,onClick:handleClick});});}\nexport const __FramerMetadata__ = {\"exports\":{\"detectVariantFromQueryString\":{\"type\":\"reactHoc\",\"name\":\"detectVariantFromQueryString\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CMSWithFilterQueryStringVariant.map"],"mappings":"8IAA4F,SAAgB,EAA6B,EAAU,CAAC,OAAoB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,KAAK,CAAC,MAAc,CAA2F,EAA7E,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAAoB,IAAI,SAAS,CAAkB,EAAG,EAAE,CAAC,CAAC,SAAS,EAAY,GAAG,EAAK,CAAC,EAAO,SAAS,QAAQ,cAAc,CAAC,KAAK,EAAM,OAAO,EAAM,MAAM,EAAM,UAAU,cAAc,UAAU,EAAO,SAAS,SAAS,SAAS,EAAO,SAAS,KAAK,CAAC,CAAC,EAAM,UAAU,GAAG,EAAK,CAAE,OAAoB,EAAK,EAAU,CAAK,MAAI,GAAG,EAAc,UAAQ,QAAQ,EAAY,CAAC,EAAG,sBAA3nB,IAAiD"}