{"version":3,"file":"Layout.DtOemcsD.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/I0I85jnJ258zUruJIsbN/15bMV5GkBV5qUPUYL9RU/Layout.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,startTransition,useEffect,useState}from\"react\";const stylesheetURL=\"https://cdn.zapier.com/packages/marketing-ui/1.42.1/styles.css\";export function withLayout(Component){return /*#__PURE__*/forwardRef(function WithLayout(props,ref){const[layoutData,setLayoutData]=useState(null);const[layoutModule,setLayoutModule]=useState(null);const[localizationModule,setLocalizationModule]=useState(null);useEffect(()=>{if(typeof window!==\"undefined\"&&typeof document!==\"undefined\"){if(!document.querySelector(`link[href=\"${stylesheetURL}\"]`)){const link=document.createElement(\"link\");link.rel=\"stylesheet\";link.href=stylesheetURL;document.head.appendChild(link);}}const load=async()=>{if(typeof window===\"undefined\")return;const loadLayoutModule=new Function(`return import(\"https://cdn.zapier.com/packages/marketing-ui/1.42.1/index.js\")`);const loadLocalizationModule=new Function(`return import(\"https://cdn.zapier.com/packages/marketing-localization/2.0.1/index.js\")`);const layoutModuleImport=await loadLayoutModule();const localizationModuleImport=await loadLocalizationModule();const data=await layoutModuleImport.fetchLayout({origin:\"https://zapier.com\"});startTransition(()=>{setLayoutModule(layoutModuleImport);setLocalizationModule(localizationModuleImport);setLayoutData(data??null);});};load();},[]);if(!layoutData||!layoutModule||!localizationModule)return null;const LayoutComponent=layoutModule.Layout;const LocalizationProviderComponent=localizationModule.LocalizationProvider;const LocaleSelectorComponent=localizationModule.LocaleSelector;return /*#__PURE__*/_jsx(LocalizationProviderComponent,{children:/*#__PURE__*/_jsx(LayoutComponent,{...layoutData,localeSelector:/*#__PURE__*/_jsx(LocaleSelectorComponent,{}),children:/*#__PURE__*/_jsx(Component,{ref:ref,...props})})});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withLayout\":{\"type\":\"reactHoc\",\"name\":\"withLayout\",\"annotations\":{\"framerContractVersion\":\"1\"}},\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