{"version":3,"file":"withSectionVisibility.D9hpw9en.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/f3Ja2bWxGXwZQjIl6h11/Jl73gN0BVmlwUWXEcQ1r/withSectionVisibility.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";const useIdentifierMatch=expectedIdentifier=>{const[isMatch,setIsMatch]=useState(false);useEffect(()=>{const checkIdentifierMatch=()=>{const params=new URLSearchParams(window.location.search);const urlIdentifier=params.get(\"identifier\");setIsMatch(urlIdentifier===expectedIdentifier);};checkIdentifierMatch();window.addEventListener(\"popstate\",checkIdentifierMatch);return()=>{window.removeEventListener(\"popstate\",checkIdentifierMatch);};},[expectedIdentifier]);return isMatch;};export function withSectionVisibility(Component){return props=>{const shouldBeVisible=useIdentifierMatch(props.id);if(!shouldBeVisible){return null;}return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSectionVisibility\":{\"type\":\"reactHoc\",\"name\":\"withSectionVisibility\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./withSectionVisibility.map"],"mappings":"2MAAijB,SAAgB,EAAsB,EAAU,CAAC,MAAO,IAA8B,EAAmB,EAAM,GAAG,CAAuD,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAApD,4BAArpB,IAAsC,CAAM,EAAmB,GAAoB,CAAC,GAAK,CAAC,EAAQ,GAAYA,EAAS,GAAM,CAAwX,OAAvX,MAAc,CAAC,IAAM,MAAyB,CAA0D,IAAM,EAAlD,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAA4B,IAAI,aAAa,CAAC,EAAW,IAAgB,EAAmB,EAAmF,OAAhF,GAAsB,CAAC,EAAO,iBAAiB,WAAW,EAAqB,KAAW,CAAC,EAAO,oBAAoB,WAAW,EAAqB,GAAK,CAAC,EAAmB,CAAC,CAAQ"}