import{_ as a}from"./hint-confirm-icon.js?v=20260328163632";import{l as s,_ as e}from"./utils-lib.js?v=20260328163632";import{aF as t,O as i,T as l,N as o,ak as n,aG as r,aH as c,aI as u,Q as m,aJ as v,aK as p,aL as d}from"./index115.js?v=20260328163632";import{k as f,a9 as h,b as _,V as b,W as j,X as x,Z as k,Y as w}from"./base-lib.js?v=20260328163632";import"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index88.js?v=20260328163632";const y={class:"pd30 hint-title"},g={class:"hint_con"},C=e(f({__name:"index",props:{compData:{default:{type:"",item:{}}}},setup(e,{expose:f}){const C=e,{type:D,item:H}=h(C.compData),I=a=>{l.value=l.value.filter((s=>s.id===a)),r.value=r.value.filter((s=>s.id===a)),c(a);const s=u(a);m.value.setSession(s),v(m.value),p(H.value.isReadOnly),d()},O=()=>{l.value.forEach((a=>{const s=u(a.id);s&&s.destroy()})),l.value=[],r.value=[],m.value.setSession(null)};return _((()=>{t()})),f({onConfirm:async()=>{try{switch(D.value){case"close":await o(H.value),n(H.value);break;case"other":const a=H.value.id,s=l.value.filter((s=>s.id!==a&&1===s.state));s.length>0&&await Promise.all(s.map((a=>o(a)))),I(a);break;case"all":await i(),O()}}catch(a){}return!0},onCancel:a=>{switch(D.value){case"close":H.value.state=0,n(H.value);break;case"other":I(H.value.id);break;case"all":O()}a&&a.onUnmount&&a.onUnmount()}}),(e,t)=>(b(),j("div",y,[t[0]||(t[0]=x("img",{class:"hint-confirm-icon flex-shrink-0 w-[40px] h-[40px]",src:a},null,-1)),x("div",g,k(w(s)("检测到文件已被修改，是否保存？")),1)]))}}),[["__scopeId","data-v-e3b7f247"]]);export{C as default};
