{"version":3,"file":"EmptyText.CcAbfpnL.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/V9A6GAqqzSgagZrJBcnp/OzIy6F3BJ7ZmSh20GaMs/EmptyText.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";function useIsClient(){const[isClient,setIsClient]=useState(false);useEffect(()=>{setIsClient(true);},[]);return isClient;}export function withHideIfEmptyText(Component){return props=>{const componentRef=useRef(null);const isClient=useIsClient();useEffect(()=>{if(componentRef.current&&isClient){const textContent=componentRef.current.textContent?.trim();const parent=componentRef.current.parentNode;if(parent){if(textContent===\"\"){parent.style.display=\"none\";}else{parent.style.display=\"\";}}}},[props.children,isClient])// Trigger update on text/content change\n;if(!isClient)return null;return /*#__PURE__*/_jsx(\"div\",{ref:componentRef,children:/*#__PURE__*/_jsx(Component,{...props})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withHideIfEmptyText\":{\"type\":\"reactHoc\",\"name\":\"withHideIfEmptyText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EmptyText.map"],"mappings":"2KAAwF,SAAS,GAAa,CAAC,GAAK,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAwC,OAAvC,MAAc,CAAC,EAAY,GAAK,EAAG,EAAE,CAAC,CAAQ,EAAU,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAM,EAAaC,EAAO,KAAK,CAAO,EAAS,GAAa,CACnT,OADoT,MAAc,CAAC,GAAG,EAAa,SAAS,EAAS,CAAC,IAAM,EAAY,EAAa,QAAQ,aAAa,MAAM,CAAO,EAAO,EAAa,QAAQ,WAAc,IAAW,IAAc,GAAI,EAAO,MAAM,QAAQ,OAAa,EAAO,MAAM,QAAQ,MAAQ,CAAC,EAAM,SAAS,EAAS,CAAC,CAC5lB,EAAyC,EAAK,MAAM,CAAC,IAAI,EAAa,SAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,CAAC,CAAC,CAAC,CAAxG,uBADsB,IAA6C"}