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