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