/** * 由 Fantastic-admin 提供技术支持 * Powered by Fantastic-admin * Gitee https://gitee.com/hooray/fantastic-admin * Github https://github.com/hooray/fantastic-admin */ import{u as P}from"./settings-be8974ad.js";import{f as p}from"./menu-2c9c5182.js";import{u as T,b as R}from"./vue-router-8a13d09b.js";import{aU as c}from"./index-5cddd228.js";function O(){const d=T(),r=R(),f=P(),t=p();function o(){return f.settings.tabbar.mergeTabsBy==="activeMenu"?d.meta.activeMenu??d.fullPath:d.fullPath}function u(e){const n=t.list.findIndex(i=>i.tabId===o());t.$patch({leaveIndex:n}),r.push(e)}function a(e){const n=o();r.push(e).then(()=>{t.remove(n)})}function h(e=o()){const n=o();if(t.list.some(i=>i.tabId===e))if(t.list.length>1)if(e===n){const i=t.list.findIndex(l=>l.tabId===e);il.tabId===e);r.push(t.list[i].fullPath)}t.removeOtherSide(e)}function x(e=o()){const n=o();if(e!==n){const i=t.list.findIndex(s=>s.tabId===e);t.list.findIndex(s=>s.tabId===n)s.tabId===e);t.list.findIndex(s=>s.tabId===n)>i&&r.push(t.list[i].fullPath)}t.removeRightSide(e)}function m(e=o()){return t.list.some(n=>!n.isPermanent&&!n.isPin&&n.tabId!==e)}function v(e=o()){let n=!0;if(e===t.list[0].tabId)n=!1;else{const i=t.list.findIndex(l=>l.tabId===e);n=t.list.some((l,s)=>ss.tabId===e);n=t.list.some((s,g)=>g>=l&&!s.isPermanent&&!s.isPin&&s.tabId!==e)}return n}return{getId:o,open:u,closeById:h,close:a,closeOtherSide:I,closeLeftSide:x,closeRightSide:b,checkCloseOtherSide:m,checkCloseLeftSide:v,checkCloseRightSide:S}}export{O as u};