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