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