import{P as o,Q as p,R as h}from"./index-deffec86.js";const r=o({id:"KeepAliveStore",state:()=>({keepAliveName:[]}),actions:{async addKeepAliveName(e){!this.keepAliveName.includes(e)&&this.keepAliveName.push(e)},async removeKeepAliveName(e){this.keepAliveName=this.keepAliveName.filter(s=>s!==e)},async setKeepAliveName(e=[]){this.keepAliveName=e}}}),l=r(),u="event_activity",c="TabsState_"+u,f=o({id:"TabsState",state:()=>({tabsMenuList:[]}),actions:{async addTabs(e){e.path.indexOf("id=")==-1&&e.title==="\u8BE6\u60C5"&&(e.title="\u65B0\u589E"),this.tabsMenuList.every(s=>s.path!==e.path)&&this.tabsMenuList.push(e),!l.keepAliveName.includes(e.name)&&e.isKeepAlive&&l.addKeepAliveName(e.name)},async removeTabs(e,s=!0){const t=this.tabsMenuList;s&&t.forEach((i,a)=>{if(i.path!==e)return;const n=t[a+1]||t[a-1];!n||p.push(n.path)}),this.tabsMenuList=t.filter(i=>i.path!==e)},async closeMultipleTab(e){this.tabsMenuList=this.tabsMenuList.filter(s=>s.path===e||!s.close),this.tabsMenuList},async setTabs(e){this.tabsMenuList=e},async setTabsTitle(e){const s=location.hash.substring(1);this.tabsMenuList.forEach(t=>{t.path==s&&(t.title=e)})}},persist:h(c)});export{r as K,f as T};
