import{r as e}from"./rolldown-runtime-BM3Ffeng.js";import{mt as t,ot as n}from"./element-plus-vendor-BF9PNysW.js";import{A as r,D as i,I as a,N as o,P as s,Pt as c,Xt as l,et as u,ht as d,k as f}from"./vue-vendor-DMUmTARL.js";import{Hi as p,Lt as m,Tt as h,Zn as g,dt as _,in as v,ss as y,xn as b}from"./icons-vendor-Buq6V-Ga.js";import{Tt as x}from"./index-y6crcKNt.js";var S={class:`zf-storage-edit__footer absolute inset-x-0 bottom-0 z-20 flex flex-col gap-3 border-t border-border bg-surface px-6 py-4 lg:px-8`},C={key:0,class:`storage-edit-footer__result`},w={class:`storage-edit-footer__result-msg`},T={class:`storage-edit-footer__actions`},E={key:0,class:`storage-edit-footer__test`},D={key:0,class:`storage-edit-footer__badge storage-edit-footer__badge--ok`},O={key:1,class:`storage-edit-footer__badge storage-edit-footer__badge--err`},k=a({__name:`StorageEditFooter`,props:{loading:{type:Boolean},isFirstStep:{type:Boolean},isLastStep:{type:Boolean},isEditMode:{type:Boolean},showConnectionTest:{type:Boolean},connectionTestLoading:{type:Boolean},connectionTestState:{},connectionTestResult:{},webdavCopyProbeLoading:{type:Boolean}},emits:[`prev`,`next`,`submit`,`testConnection`,`clearConnectionTest`],setup(e,{emit:a}){let x=a;return(a,k)=>{let A=n,j=t;return u(),r(`div`,S,[e.showConnectionTest&&e.connectionTestState===`failed`&&e.connectionTestResult?(u(),r(`div`,C,[s(c(g),{class:`storage-edit-footer__result-icon`}),i(`div`,w,l(e.connectionTestResult.message),1),i(`button`,{type:`button`,class:`storage-edit-footer__result-close`,title:`关闭`,onClick:k[0]||=e=>x(`clearConnectionTest`)},[s(c(y),{class:`h-4 w-4`})])])):f(``,!0),i(`div`,T,[e.showConnectionTest?(u(),r(`div`,E,[s(A,{type:`success`,icon:c(h),loading:e.connectionTestLoading,disabled:e.loading||e.webdavCopyProbeLoading,onClick:k[1]||=e=>x(`testConnection`)},{default:d(()=>[o(l(e.connectionTestState===`idle`?`测试连接`:`重新测试`),1)]),_:1},8,[`icon`,`loading`,`disabled`]),e.connectionTestState===`success`&&e.connectionTestResult?(u(),r(`span`,D,[s(c(b),{class:`h-4 w-4`}),o(` 连接成功 · `+l(e.connectionTestResult.costMs)+`ms `,1)])):e.connectionTestState===`failed`&&e.connectionTestResult?(u(),r(`span`,O,[s(c(v),{class:`h-4 w-4`}),o(` 连接失败 · `+l(e.connectionTestResult.costMs)+`ms `,1)])):f(``,!0)])):f(``,!0),s(A,{type:`primary`,icon:c(_),disabled:e.loading||e.webdavCopyProbeLoading||e.isFirstStep,onClick:k[2]||=e=>x(`prev`)},{default:d(()=>[...k[5]||=[o(` 上一步 `,-1)]]),_:1},8,[`icon`,`disabled`]),s(A,{type:`primary`,disabled:e.loading||e.webdavCopyProbeLoading||e.isLastStep,onClick:k[3]||=e=>x(`next`)},{default:d(()=>[k[6]||=o(` 下一步 `,-1),s(j,{class:`el-icon--right`},{default:d(()=>[s(c(p))]),_:1})]),_:1},8,[`disabled`]),s(A,{type:`primary`,icon:c(m),loading:e.loading,disabled:e.webdavCopyProbeLoading||!(e.isLastStep||e.isEditMode),onClick:k[4]||=e=>x(`submit`)},{default:d(()=>[...k[7]||=[o(` 保存设置 `,-1)]]),_:1},8,[`icon`,`loading`,`disabled`])])])}}}),A=e({default:()=>j}),j=x(k,[[`__scopeId`,`data-v-7650c815`]]);export{A as n,j as t};