import{M as e,I as s,Q as a,e as o}from"./utils-lib.js?v=1761009159";import{c as r,h as t,o as c,k as l,l as n,q as m,p,e as d,x as i,y as f,N as u,z as g,Q as _,a7 as x,a4 as b}from"./base-lib.js?v=1761009159";import{g as v,bs as y}from"./useStore4.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const D={class:"flex flex-col p-[1.6rem] lib-box"},F={class:"flex"},j={class:"my-[1.4rem] text-[1.4rem] pl-[1rem] leading-[2rem]"},k=["innerHTML"],h={key:0,class:"pl-[5rem]"},w=o(r({__name:"uninstall-confirm",props:{compData:{default:()=>({})}},emits:["close"],setup(o,{expose:r,emit:w}){const{getDockerState:H}=v(),M=o,S=w,V=e=>e.replace(/卸载/g,'<span style="color:red;white-space:nowrap;">卸载</span>'),q=t({force:!1,msg:V("即将卸载Docker，是否继续？"),needForce:!1});return c((()=>{try{q.needForce=!!M.compData.needForce,q.msg=q.needForce?V(M.compData.msg):V("即将卸载Docker，是否继续？")}catch(e){}})),r({onConfirm:async()=>{!q.needForce||q.force?s({request:y({type:q.force?1:0}),message:!0,success:({status:e})=>{H(),e&&S("close")}}):e.error("请勾选强制卸载后再操作")}}),(e,s)=>{const o=_,r=x,t=b,c=a;return l(),n("div",D,[m("div",F,[s[2]||(s[2]=m("i",{class:"!text-[#e6a23c] !text-[4rem] svgtofont-el-warning-filled"},null,-1)),m("div",j,[m("span",{innerHTML:p(q).msg},null,8,k)])]),p(q).needForce?(l(),n("div",h,[d(t,{model:p(q),onSubmit:s[1]||(s[1]=u((()=>{}),["prevent"]))},{default:i((()=>[d(r,{prop:"force"},{default:i((()=>[d(o,{modelValue:p(q).force,"onUpdate:modelValue":s[0]||(s[0]=e=>p(q).force=e)},{default:i((()=>s[3]||(s[3]=[f("强制卸载")]))),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model"]),d(c,{class:"mt-[2rem]",options:[{content:"强制卸载可能会残留容器信息或镜像"}]})])):g("",!0)])}}}),[["__scopeId","data-v-8ceca77c"]]);export{w as default};
