import{v as i,w as a,R as o,x as r}from"./index-5df52834.js";const u=Pinia.defineStore({id:"pure-app",state:()=>{var e,t;return{sidebar:{opened:((e=i().getItem("responsive-layout"))==null?void 0:e.sidebarStatus)??a().SidebarStatus,withoutAnimation:!1,isClickCollapse:!1},layout:((t=i().getItem("responsive-layout"))==null?void 0:t.layout)??a().Layout,device:o()?"mobile":"desktop",sortSwap:!1}},getters:{getSidebarStatus(e){return e.sidebar.opened},getDevice(e){return e.device}},actions:{TOGGLE_SIDEBAR(e,t){const s=i().getItem("responsive-layout");e&&t?(this.sidebar.withoutAnimation=!0,this.sidebar.opened=!0,s.sidebarStatus=!0):!e&&t?(this.sidebar.withoutAnimation=!0,this.sidebar.opened=!1,s.sidebarStatus=!1):!e&&!t&&(this.sidebar.withoutAnimation=!1,this.sidebar.opened=!this.sidebar.opened,this.sidebar.isClickCollapse=!this.sidebar.opened,s.sidebarStatus=this.sidebar.opened),i().setItem("responsive-layout",s)},async toggleSideBar(e,t){await this.TOGGLE_SIDEBAR(e,t)},toggleDevice(e){this.device=e},setLayout(e){this.layout=e},setSortSwap(e){this.sortSwap=e}}});function n(){return u(r)}export{n as u};
