import{I as n}from"./iconify-p99pbjf9.js";import{d as B,r as N,w as _,g as t,i as c,C as a,J as i,A as h,K as P,L as I,H as M,j as e,ax as u,B as d,P as m,O as g,an as p,_ as v,t as b,aC as L}from"./index-DOFLUERq.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";const j={style:{display:"flex","align-items":"center",gap:"8px"}},A={style:{margin:"0"}},D={class:"progress-content"},E={class:"steps-container"},F={class:"step-icon"},H={class:"step-content"},J={class:"step-title"},K={key:0,class:"step-message"},O={key:1,class:"step-error-message"},S={class:"dialog-actions"},T=B({__name:"PublishProgressModal",props:{modelValue:{type:Boolean},title:{},steps:{},status:{}},emits:["update:modelValue","retry"],setup(o,{emit:x}){const f=o,y=x,r=N(f.modelValue);_(()=>f.modelValue,l=>{r.value=l}),_(r,l=>{y("update:modelValue",l)});function C(){f.status!=="processing"&&(r.value=!1)}function z(l){!l&&f.status!=="processing"?r.value=!1:!l&&f.status==="processing"?r.value=!0:r.value=l}function V(){y("retry")}return(l,k)=>(t(),c(e(L),{show:r.value,"onUpdate:show":[k[0]||(k[0]=s=>r.value=s),z],preset:"card",style:{width:"600px"},"mask-closable":o.status!=="processing","close-on-esc":o.status!=="processing"},{header:a(()=>[i("div",j,[o.status==="processing"?(t(),c(e(u),{key:0,size:20},{default:a(()=>[d(e(n),{icon:"tabler:hourglass"})]),_:1})):o.status==="success"?(t(),c(e(u),{key:1,size:20,color:"#10b981"},{default:a(()=>[d(e(n),{icon:"tabler:check-circle"})]),_:1})):o.status==="error"?(t(),c(e(u),{key:2,size:20,color:"#ef4444"},{default:a(()=>[d(e(n),{icon:"tabler:x-circle"})]),_:1})):g("",!0),i("h3",A,m(o.title),1)])]),action:a(()=>[i("div",S,[o.status==="error"||o.status==="success"?(t(),c(e(p),{key:0,type:"default",size:"medium",onClick:C,class:"action-btn-close"},{default:a(()=>[v(m(e(b)("Close")),1)]),_:1})):g("",!0),o.status==="error"?(t(),c(e(p),{key:1,type:"primary",size:"medium",onClick:V,class:"action-btn-retry"},{default:a(()=>[v(m(e(b)("Retry")),1)]),_:1})):g("",!0)])]),default:a(()=>[i("div",D,[i("div",E,[(t(!0),h(P,null,I(o.steps,(s,w)=>(t(),h("div",{key:w,class:M(["step-item",{"step-active":s.status==="processing","step-success":s.status==="success","step-error":s.status==="error","step-pending":s.status==="pending"}])},[i("div",F,[s.status==="processing"?(t(),c(e(u),{key:0,size:20},{default:a(()=>[d(e(n),{icon:"tabler:loader-2",class:"rotating"})]),_:1})):s.status==="success"?(t(),c(e(u),{key:1,size:20,color:"#10b981"},{default:a(()=>[d(e(n),{icon:"tabler:check"})]),_:1})):s.status==="error"?(t(),c(e(u),{key:2,size:20,color:"#ef4444"},{default:a(()=>[d(e(n),{icon:"tabler:x"})]),_:1})):(t(),c(e(u),{key:3,size:20,color:"#94a3b8"},{default:a(()=>[d(e(n),{icon:"tabler:circle"})]),_:1}))]),i("div",H,[i("div",J,m(s.title),1),s.message?(t(),h("div",K,m(s.message),1)):g("",!0),s.error?(t(),h("div",O,m(s.error),1)):g("",!0)])],2))),128))])])]),_:1},8,["show","mask-closable","close-on-esc"]))}}),Q=R(T,[["__scopeId","data-v-c97c0883"]]);export{Q as default};
