System.register(["./index-legacy.js?v=1763625242172","./public-legacy.js?v=1763625242172","./page_layout-legacy.js?v=1763625242172","./ResourceManagerWindow-legacy.js?v=1763625242172","./naive-legacy.js?v=1763625242172","./vue-legacy.js?v=1763625242172","./common-legacy.js?v=1763625242172","./__commonjsHelpers__-legacy.js?v=1763625242172","./index-legacy39.js?v=1763625242172","./soft-legacy2.js?v=1763625242172","./soft-legacy.js?v=1763625242172","./site-legacy.js?v=1763625242172","./file-legacy2.js?v=1763625242172","./index.vue_vue_type_script_setup_true_lang-legacy7.js?v=1763625242172"],(function(e,a){"use strict";var l,t,i,n,u,s,c,o,p,r,d,f,m,k,v,g,h,y,b,_,x,M,j,w,C,B,P,R;return{setters:[e=>{l=e._},e=>{t=e.f,i=e.a,n=e.h},e=>{u=e.a9,s=e.bf,c=e.x,o=e.m,p=e._},e=>{r=e.R},e=>{d=e.au,f=e.aC,m=e.az},e=>{k=e.k,v=e.P,g=e.i,h=e.r,y=e.av,b=e.R,_=e.S,x=e.X,M=e.a3,j=e.U,w=e.V,C=e.j,B=e.a4,P=e.aj,R=e.F},null,null,null,null,null,null,null,null],execute:function(){const a={class:"p-20px"},U={class:"flex items-center gap-16px mb-16px"},N={class:"p-20px"},S={class:"mb-16px text-14px"},q={class:"flex items-center gap-20px"},z={class:"text-13px"};e("default",k({__name:"Backup",setup(e,{expose:k}){const{t:D}=v(),F=g("fileStore"),{currentPath:O,backupForm:T}=F,H=h(!1),V=h(!1),W=h([]);k({open(){T.value.path="",H.value=!0,K()},close(){H.value=!1,W.value=[]}});const X=h(!1),A=y("resourceManagerRef"),E=h([{key:"time",title:D("file.backupModal.backupTime"),width:160,render:e=>u(e.time)},{key:"path",title:D("file.backupModal.backupPath"),ellipsis:{tooltip:!0}},{key:"name",title:D("file.backupModal.backupName"),width:120,ellipsis:{tooltip:!0},render:e=>e.name||"--"},t({width:100,options:e=>[{label:D("Public.Btn.Delete"),onClick:()=>{i({title:D("file.backupModal.deleteBackup"),content:D("file.backupModal.deleteConfirm"),onConfirm:async()=>{await s.post("/files?action=del_path_premissions",{id:e.id},{requestOptions:{loading:D("file.backupModal.deletingBackup"),successMessage:!0}}),K()}})}}]})]);function G(){A.value?.open()}function I(e){T.value.path=e}function J(){T.value.path?X.value=!0:o.warning(D("file.backupModal.pleaseSelectPath"))}async function K(){try{V.value=!0;const{message:e}=await s.post("/files?action=get_all_back");c(e)?W.value=e.map((e=>({id:Number(e[0]),time:Number(e[2]),name:e[1],path:e[3]}))):W.value=[]}finally{V.value=!1}}async function L(){try{await s.post("/files?action=back_path_permissions",T.value,{requestOptions:{loading:D("file.backupModal.executingBackup"),successMessage:!0}}),K(),T.value.path="",T.value.remark=""}catch(e){console.warn(e)}}return(e,t)=>{const i=d,u=p,s=f,c=m,o=n,k=l;return b(),_(R,null,[x(k,{show:w(H),"onUpdate:show":t[1]||(t[1]=e=>P(H)?H.value=e:null),title:w(D)("file.backupModal.title"),width:"700"},{default:M((()=>[j("div",a,[j("div",U,[x(c,null,{default:M((()=>[x(i,{value:w(T).path,"onUpdate:value":t[0]||(t[0]=e=>w(T).path=e)},null,8,["value"]),x(s,{onClick:G},{icon:M((()=>[x(u,{name:"file-dir",size:"20"})])),_:1})])),_:1}),x(s,{type:"primary",onClick:J},{default:M((()=>[C(B(w(D)("file.backupModal.backupButton")),1)])),_:1})]),x(o,{loading:w(V),"max-height":370,data:w(W),columns:w(E)},null,8,["loading","data","columns"])])])),_:1},8,["show","title"]),x(k,{show:w(X),"onUpdate:show":t[3]||(t[3]=e=>P(X)?X.value=e:null),title:w(D)("file.backupModal.confirmTitle"),width:320,footer:!0,onConfirm:L},{default:M((()=>[j("div",N,[j("div",S,B(w(D)("file.backupModal.enterBackupName")),1),j("div",q,[j("div",z,B(w(D)("file.backupModal.remarks")),1),x(i,{class:"flex-1",value:w(T).remark,"onUpdate:value":t[2]||(t[2]=e=>w(T).remark=e)},null,8,["value"])])])])),_:1},8,["show","title"]),x(r,{ref_key:"resourceManagerRef",ref:A,"current-path":w(O),onChooseDir:I},null,8,["current-path"])],64)}}}))}}}));
