{"version":3,"file":"FetchPrice.Egh_hWSq.mjs","names":[],"sources":["https:/framerusercontent.com/modules/GYijN3fXsUlLVMCNmLpj/EJRGsezSFUelMPMwqUOk/FetchPrice.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export function withSubscriptionPrice(Component){return props=>{const[price,setPrice]=useState(null)// Initially null (hidden)\n;useEffect(()=>{const fetchPrice=async()=>{try{const response=await fetch(\"https://teams-service.elevate.io/plansv2?includeLocalPrices=true\");if(!response.ok)throw new Error(\"Failed to fetch data\");const data=await response.json();if(data.length>1&&data[1].subscriptionPrice){// Return raw price exactly as received from API\nconst rawPrice=data[1].subscriptionPrice;setPrice(rawPrice);}}catch(error){// Do nothing on error (keeps text hidden)\n}};fetchPrice();},[]);return /*#__PURE__*/_jsx(Component,{...props,text:price||\"\"})// If price is null, text remains empty\n;};}\nexport const __FramerMetadata__ = {\"exports\":{\"withSubscriptionPrice\":{\"type\":\"reactHoc\",\"name\":\"withSubscriptionPrice\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FetchPrice.map"],"mappings":"mKAAiF,SAAgB,EAAsB,EAAU,CAAC,MAAO,CAAA,GAAO,CAAC,GAAK,CAAC,EAAM,EAAS,CAAC,EAAS,KAAK,CAG/J,MAFrB,GAAU,IAAI,CAAC,IAAM,EAAW,SAAS,CAAC,GAAG,CAAC,IAAM,EAAS,KAAM,OAAM,mEAAmE,CAAC,IAAI,EAAS,GAAG,KAAM,CAAI,MAAM,uBAAA,CAAwB,IAAM,EAAK,KAAM,GAAS,MAAM,CAAC,GAAG,EAAK,OAAO,GAAG,EAAK,GAAG,kBAAkB,CACnR,IAAM,EAAS,EAAK,GAAG,kBAAkB,EAAS,EAAS,AAAE,CAAC,MAAY,CACzE,CAAC,EAAC,GAAY,AAAE,EAAC,CAAE,EAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAO,EAAG,EAAC,AACjF,CAAE,cAJJ,GAA2C,IAAsC"}