{"version":3,"file":"MonthlyFetchPrice.B7M3ojSL.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,EAAS,CAACA,EAAS,MAG1J,OAFrB,MAAc,CAAC,IAAM,EAAW,SAAS,CAAC,GAAG,CAAC,IAAM,EAAS,MAAM,MAAM,oEAAoE,GAAG,CAAC,EAAS,GAAG,MAAU,MAAM,wBAAwB,IAAM,EAAK,MAAM,EAAS,OAAO,GAAG,EAAK,OAAO,EAAE,CACxP,IAAM,EAAY,EAAK,KAAK,GAAM,EAAK,UAAU,WAAW,GAAG,GAAa,EAAY,kBAAkB,CAAC,IAAM,EAAS,EAAY,kBAAkB,EAAS,EAAW,CAAC,CAAC,MAAY,CACzL,CAAC,EAAC,GAAc,EAAC,EAAE,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,KAAK,GAAO,GAAG,CAChF,CAAE"}