import{c as a,q as e,_ as s}from"./public.js?v=1753954525509";import{n as t,c as l,V as n,W as o,_ as r,O as i}from"./page_layout.js?v=1753954525509";import c from"./backup-info.js?v=1753954525509";import{u as p,G as u,H as f}from"./utils.js?v=1753954525509";import{k as _,P as m,r as d,e as x,U as b,a1 as g,a2 as k,Q as C,X as B,j as y,a3 as j,al as v,W as h}from"./vue.js?v=1753954525509";import{c6 as w,_ as z,bY as G}from"./naive.js?v=1753954525509";import"./common.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./soft.js?v=1753954525509";const H={class:"text-error"},P=_({__name:"index",props:{onRefresh:{type:Function},data:{}},setup(_,{expose:P}){const{t:R}=m(),U=_,W=p(),q=d(),D=x({auto_exit:!1,force_restore:!1}),{loading:F,setLoading:L}=a();return(async()=>{try{L(!0);const{message:a}=await f({timestamp:U.data.timestamp,type:"backup"});l(a)&&(q.value=a,W.getData(a.data_status))}finally{L(!1)}})(),P({onConfirm:async()=>new Promise((a=>{e({title:R("Config.Backup.index_68"),content:()=>C(w,{type:"warning"},{default:()=>[C("span",{class:"color-warning font-bold"},[y(" "),R("Config.Backup.index_69"),y(" ")])]}),onConfirm:async()=>{await u({timestamp:U.data.timestamp,auto_exit:D.auto_exit?1:0,force_restore:D.force_restore?1:0}),U.onRefresh(),a(!0)},onCancel:()=>{a(!1)}})}))}),(a,e)=>{const l=n,p=o,u=z,f=G,_=r,m=s,d=i;return b(),g(d,{show:B(F),class:"p-16px"},{default:k((()=>[C(p,{class:"mb-16px",column:2,bordered:"","label-placement":"left","label-style":{width:"150px"}},{default:k((()=>[C(l,{label:B(R)("Config.Backup.index_59")},{default:k((()=>[y(j(U.data.backup_name),1)])),_:1},8,["label"]),C(l,{label:B(R)("Config.Backup.index_60")},{default:k((()=>{var a;return[y(j(null==(a=B(q))?void 0:a.done_time),1)]})),_:1},8,["label"]),C(l,{label:B(R)("Config.Backup.index_61")},{default:k((()=>{var a;return[y(j(B(t)(Number((null==(a=B(q))?void 0:a.backup_file_size)||0))),1)]})),_:1},8,["label"]),C(l,{label:B(R)("Config.Backup.index_62")},{default:k((()=>{var a;return[y(j(null==(a=B(q))?void 0:a.backup_file),1)]})),_:1},8,["label"]),C(l,{label:B(R)("Config.Backup.index_63")},{default:k((()=>{var a;return[y(j(null==(a=B(q))?void 0:a.backup_file_sha256),1)]})),_:1},8,["label"])])),_:1}),C(c),C(f,{class:"flex-col! my-20px gap-16px!"},{default:k((()=>[v("",!0),C(u,{checked:B(D).force_restore,"onUpdate:checked":e[1]||(e[1]=a=>B(D).force_restore=a)},{default:k((()=>[y(j(B(R)("Config.Backup.index_64")),1)])),_:1},8,["checked"]),v("",!0)])),_:1}),C(m,{class:"mt-16px"},{default:k((()=>[h("li",null,[C(_,{name:"base-warning",class:"text-warning mr-4px",size:"16"}),h("span",null,[h("text",null,j(B(R)("Config.Backup.index_65"))+" 252.97 MB "+j(B(R)("Config.Backup.index_66"))+" 16.97 GB",1),C(_,{name:"base-refresh",class:"text-primary ml-4px"})])]),h("li",H,j(B(R)("Config.Backup.index_67")),1)])),_:1})])),_:1},8,["show"])}}});export{P as default};
