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