{"version":3,"file":"HideElement.CyKFp1SO.mjs","names":["React.useState","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/uTlaLWr6OcdvuUZQc5Bl/heKSNI4lr0loErahTDP9/HideElement.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";export function HideElement(props){const{paramName=\"embed\",paramValue=\"app\",hideMode=\"display\"}=props;const[shouldHide,setShouldHide]=React.useState(false);React.useEffect(()=>{// Tohle běží jen v prohlížeči, ne na serveru\nconst params=new URLSearchParams(window.location.search);setShouldHide(params.get(paramName)===paramValue);},[paramName,paramValue]);let style={};if(shouldHide){switch(hideMode){case\"visibility\":style={visibility:\"hidden\"};break;case\"opacity\":style={opacity:0,pointerEvents:\"none\"};break;case\"display\":default:style={display:\"none\"};}}return{style};}// Add Framer Controls\nHideElement.defaultProps={paramName:\"embed\",paramValue:\"app\",hideMode:\"display\"};export const __framerMetadata__={exports:{default:{type:\"override\",name:\"HideElement\"}}};import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withHideElement(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...HideElement(props)});};}withHideElement.displayName=\"HideElement\";\nexport const __FramerMetadata__ = {\"exports\":{\"withHideElement\":{\"type\":\"reactHoc\",\"name\":\"withHideElement\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__framerMetadata__\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"HideElement\":{\"type\":\"override\",\"name\":\"HideElement\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./HideElement.map"],"mappings":"+LAAuE,SAAgB,EAAY,EAAM,CAAC,GAAK,CAAC,YAAU,QAAQ,aAAW,MAAM,WAAS,WAAW,EAAW,CAAC,EAAW,GAAeA,EAAe,GAAM,CAAC,MAAoB,CAC9L,EAA5C,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAAsB,IAAI,EAAU,GAAG,EAAW,EAAG,CAAC,EAAU,EAAW,CAAC,CAAC,IAAI,EAAM,EAAE,CAAC,GAAG,EAAY,OAAO,EAAP,CAAiB,IAAI,aAAa,EAAM,CAAC,WAAW,SAAS,CAAC,MAAM,IAAI,UAAU,EAAM,CAAC,QAAQ,EAAE,cAAc,OAAO,CAAC,MAAM,IAAI,UAAU,QAAQ,EAAM,CAAC,QAAQ,OAAO,CAAG,MAAM,CAAC,QAAM,CAC/B,SAAgB,EAAgB,EAAE,CAAC,MAAO,KAAQ,EAA+BC,EAAwC,CAAQC,EAAK,EAAE,CAAC,GAAG,EAAM,GAAG,EAAY,EAAM,CAAC,CAAC,uBAF3b,IAA4B,IAEsP,CAA7T,EAAY,aAAa,CAAC,UAAU,QAAQ,WAAW,MAAM,SAAS,UAAU,CAA0Z,EAAgB,YAAY"}