import{b as r,p as a}from"./index-DiwDH9aE.js";const s=r(a((e,c)=>({cycle:null,isLoading:!1,error:null,lastChecked:null,setCycle:l=>{e({cycle:l,error:null,lastChecked:new Date().toISOString()})},clearCycle:()=>{e({cycle:null,error:null,lastChecked:new Date().toISOString()})},setLoading:l=>{e({isLoading:l})},setError:l=>{e({error:l,isLoading:!1})},isCycleActive:()=>c().cycle?.active===!0,isEnrollmentOpen:()=>c().cycle?.enrollment_open===!0,canEnroll:()=>{const{isCycleActive:l,isEnrollmentOpen:n}=c();return l()&&n()},getCycleName:()=>c().cycle?.name||null,hasCycle:()=>c().cycle!==null}),{name:"cepre-cycle",partialize:e=>({cycle:e.cycle,lastChecked:e.lastChecked})}));export{s as u};
