import{b as v,a as b,c as A}from"./index-996f931c-1782111760424v=1.0.0.js";import{u as T,a as g}from"./tabs-cb939388-1782111760424v=1.0.0.js";import{E as l}from"./eleVendor-99a45232-1782111760424v=1.0.0.js";import{f as S,a as i}from"./vendor-7f807b9d-1782111760424v=1.0.0.js";const K=()=>{const f=v(),m=S(()=>f.companyAreaId),t=i(!1),d=i(),o=b(),p=A(),u=T(),c=g();return{BaseCompanyAreaId:m,closeCurrent:(e,r)=>{if(e){u.removeTabs(e),c.removeKeepAliveName(r);return}o.meta.isAffix||(u.removeTabs(o.fullPath),c.removeKeepAliveName(o.name),p.back())},ruleFormRef:d,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})):a({flag:!1,...s}),t.value=!1})},loading:t}};export{K as u};
