import{bh as d,J as i,O as r,bi as n}from"./index-5a763f46.js";const s=n({prefixKey:"",storage:sessionStorage}),l=d("student-register-store",{state:()=>({token:s.get(i,""),selectGoods:[],selectVip:[],schoolId:s.get("register_school_id","")}),getters:{getToken(){return this.token},getGoods(){return this.selectGoods},getVip(){return this.selectVip},getSchoolId(){return this.schoolId}},actions:{setToken(e){this.token=e,s.set(i,e)},deleteToken(){this.token="",s.remove(i)},setGoods(e){this.selectGoods.push(e)},deleteGoods(e){const o=this.selectGoods.findIndex(t=>t.productSkuId===e);this.selectGoods.splice(o,1)},setVip(e){this.selectVip=e},deleteVip(e){const o=this.selectVip.findIndex(t=>t.goodsId===e);this.selectVip.splice(o,1)},selectedVip(e){return this.selectVip.findIndex(t=>t.goodsId===e)>=0},setShoolId(e){this.schoolId=e,s.set("register_school_id",e)},studentLoutOut(){this.deleteToken(),r.replace({path:"/student-register",query:{sId:this.schoolId}})}}});export{l as u};
