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