{"version":3,"file":"MonthlyFetchPrice.BYygACql.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/bsW7OC6kROFpRu25j0G8/n4yt74aQMaKRnJtYvrzJ/MonthlyFetchPrice.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>0){// Find the monthly plan specifically\nconst monthlyPlan=data.find(plan=>plan.cadence===\"MONTHLY\");if(monthlyPlan&&monthlyPlan.subscriptionPrice){const rawPrice=monthlyPlan.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=./MonthlyFetchPrice.map"],"mappings":"mKAAiF,SAAgB,EAAsB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAUA,EAAS,KAAK,CAG/J,OAFrB,MAAc,EAAkB,SAAS,CAAC,GAAG,CAAC,IAAM,EAAS,MAAM,MAAM,mEAAmE,CAAC,GAAG,CAAC,EAAS,GAAG,MAAU,MAAM,uBAAuB,CAAC,IAAM,EAAK,MAAM,EAAS,MAAM,CAAC,GAAG,EAAK,OAAO,EAAE,CACxP,IAAM,EAAY,EAAK,KAAK,GAAM,EAAK,UAAU,UAAU,CAAC,GAAG,GAAa,EAAY,kBAAkB,CAAC,IAAM,EAAS,EAAY,kBAAkB,EAAS,EAAS,QAAgB,MAC3K,EAAG,EAAE,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAO,GAAG,CAAC,mBAHxC,IAAsC"}