import{U as p,f as v,p as i,O as T,u as g,D as l}from"./index-deffec86.js";import{T as b,K as A}from"./tabs-96386b59.js";const y=()=>{const f=p();v(()=>f.companyAreaId);const t=i(!1),m=i(),o=T(),d=g(),u=b(),c=A();return{closeCurrent:(e,r)=>{if(e){u.removeTabs(e),c.removeKeepAliveName(r);return}o.meta.isAffix||(u.removeTabs(o.fullPath),c.removeKeepAliveName(o.name),d.back())},ruleFormRef:m,setTitle:e=>{u.setTabsTitle(e)},addMethod:(e,r,n="\u65B0\u589E\u6210\u529F")=>{if(!t.value)return new Promise(async a=>{let s=await e(r);s.code==200?(l.success(n),a({flag:!0,...s})):a({flag:!1,...s}),t.value=!1})},updateMethod:(e,r,n="\u66F4\u65B0\u6210\u529F")=>{if(!t.value)return new Promise(async a=>{let s=await e(r);s.code==200?(l.success(n),a({flag:!0,...s})):(l.error(s.message),a({flag:!1,...s})),t.value=!1})},loading:t}};export{y as u};
