{"version":3,"file":"EmptyText.k8UnjVwb.mjs","names":[],"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,EAAY,CAAC,GAAS,EAAM,CAAwC,MAAvC,GAAU,IAAI,CAAC,GAAY,EAAK,AAAE,EAAC,CAAE,EAAC,CAAQ,CAAU,UAAgB,EAAoB,EAAU,CAAC,MAAO,CAAA,GAAO,CAAC,IAAM,EAAa,EAAO,KAAK,CAAO,EAAS,GAAa,CACnT,MADoT,GAAU,IAAI,CAAC,GAAG,EAAa,SAAS,EAAS,CAAC,IAAM,EAAY,EAAa,QAAQ,aAAa,MAAM,CAAO,EAAO,EAAa,QAAQ,WAAW,AAAG,IAAW,IAAc,GAAI,EAAO,MAAM,QAAQ,OAAa,EAAO,MAAM,QAAQ,GAAM,CAAC,EAAC,CAAC,EAAM,SAAS,CAAS,EAAC,CAC5lB,EAAyC,EAAK,MAAM,CAAC,IAAI,EAAa,SAAsB,EAAK,EAAU,CAAC,GAAG,CAAM,EAAC,AAAC,EAAC,CAAxG,IAA0G,CAAE,cADjI,GAA2C,IAA6C"}