{"version":3,"file":"withFilterUpdate.CZPCSygs.mjs","names":["paymentInterval"],"sources":["https:/framerusercontent.com/modules/U7Gk6MCDr8UfNeiBVJeN/Rs5L7D0bsAspEvUCe01z/withFilterUpdate.js"],"sourcesContent":["/*\n    UPDATE FILTERS\n    Compound override for elements that are influenced by changes in GRADE / INTERVAL\n*/import{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{useStore}from\"https://framer.com/m/ElicejusStore-HHWF.js@AIAuRd3zvtbJvf10k1Uq\";export function withFilterUpdate(Component){return props=>{const{gradeFallback,onlyShowGrades,listAllGrades}=props;const[store]=useStore();const allowedGrades=useMemo(()=>{if(!onlyShowGrades)return[];return onlyShowGrades.split(\",\").map(s=>Number(s.trim())).filter(n=>!isNaN(n));},[onlyShowGrades]);const{computedGrade,paymentInterval}=useMemo(()=>{const elicejusGrade=store.elicejusGrade;const paymentInterval=store.elicejusPaymentInterval;if(listAllGrades&&(elicejusGrade==null||elicejusGrade===-1)){return{computedGrade:\"5,6,7,8,9,10,11,12\",paymentInterval};}if(elicejusGrade==null){return{computedGrade:undefined,paymentInterval};}if(allowedGrades.length>0&&!allowedGrades.includes(elicejusGrade)){return{computedGrade:allowedGrades[0],paymentInterval};}if(elicejusGrade<5||elicejusGrade>12){return{computedGrade:gradeFallback!==undefined?gradeFallback:undefined,paymentInterval};}return{computedGrade:elicejusGrade,paymentInterval};},[store.elicejusGrade,store.elicejusPaymentInterval,gradeFallback,allowedGrades,listAllGrades]);// ✅ Log the computed grade for debugging\nconsole.log(\"🔍 computedGrade:\",computedGrade);return /*#__PURE__*/_jsx(Component,{...props,grade:computedGrade,paymentInterval:paymentInterval});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withFilterUpdate\":{\"type\":\"reactHoc\",\"name\":\"withFilterUpdate\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./withFilterUpdate.map"],"mappings":"qPAG8J,SAAgB,EAAiB,EAAU,CAAC,MAAO,CAAA,GAAO,CAAC,GAAK,CAAC,gBAAc,iBAAe,gBAAc,CAAC,EAAW,CAAC,EAAM,CAAC,GAAU,CAAO,EAAc,EAAQ,IAAS,EAA+B,EAAe,MAAM,IAAI,CAAC,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,IAAI,MAAM,EAAE,CAAC,CAAjF,CAAE,EAAkF,CAAC,CAAe,EAAC,CAAM,CAAC,gBAAc,kBAAgB,CAAC,EAAQ,IAAI,CAAC,IAAM,EAAc,EAAM,cAAoBA,EAAgB,EAAM,wBAAod,OAAzb,IAAgB,GAAe,MAAM,IAAgB,IAAW,CAAC,cAAc,qBAAqB,gBAAA,CAAgB,EAAK,GAAe,KAAY,CAAC,kBAAA,GAAwB,gBAAA,CAAgB,EAAK,EAAc,OAAO,IAAI,EAAc,SAAS,EAAc,CAAQ,CAAC,cAAc,EAAc,GAAG,gBAAA,CAAgB,EAAK,EAAc,GAAG,EAAc,GAAU,CAAC,cAAc,QAAA,OAA0B,GAAA,EAAwB,gBAAA,CAAgB,EAAQ,CAAC,cAAc,EAAc,gBAAA,CAAgB,CAAE,EAAC,CAAC,EAAM,cAAc,EAAM,wBAAwB,EAAc,EAAc,CAAc,EAAC,CACxnC,MAA/C,SAAQ,IAAI,oBAAoB,EAAc,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,EAA8B,iBAAgB,EAAC,AAAE,CAAE,cADnJ,GAA2C,IAA2B,IAAsF"}