System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./check-legacy-DG4HeWug.js?v=1773287522785","./FileIcon-legacy-CYrICTNK.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./soft-legacy-CzxZ2w7j.js?v=1773287522785","./copy-legacy-CoXPjkKf.js?v=1773287522785"],(function(e,l){"use strict";var a,o,t,r,u,i,n,d,s,v,p,f,c,m,w,g,h,_,y,D;return{setters:[e=>{a=e.x,o=e.as},e=>{t=e._},e=>{r=e.g},e=>{u=e.Q,i=e.w},e=>{n=e.k,d=e.R,s=e.i,v=e.r,p=e.al,f=e.$,c=e.a8,m=e.a9,w=e._,g=e.a0,h=e.S,_=e.X},e=>{y=e.a1,D=e.b},null,null,null],execute:function(){const l={class:"p-20px pt-28px"},b={class:"w-320px"},j={class:"w-320px"},x={class:"w-320px"};e("default",n({__name:"RemoteDownload",setup(e,{expose:n}){const{t:M}=d(),R=s("fileStore"),{downloadFileFormData:E,currentPath:F}=R,U=v(!1),k=p("formRef"),q={url:{trigger:["input","blur"],validator:()=>E.value.url?!!r(E.value.url)||new Error(M("file.remoteDownloadModal.validation.urlInvalid")):new Error(M("file.remoteDownloadModal.validation.urlRequired"))},path:{trigger:["input","blur"],validator:()=>!!E.value.path||new Error(M("file.remoteDownloadModal.validation.pathRequired"))},filename:{trigger:["input","blur"],validator:()=>!!E.value.filename||new Error(M("file.remoteDownloadModal.validation.filenameRequired"))}},S=e=>{const l=e.split("/").pop();E.value.filename=l||""};n({open(){E.value.url="http://",E.value.path=F.value,E.value.filename="",U.value=!0},close(){U.value=!1}});const I=async()=>{await(k.value?.validate()),await o.post("/files?action=DownloadFile",{...E.value}),u(R),i(R)};return(e,o)=>{const r=D,u=y,i=t,n=a;return f(),c(n,{show:h(U),"onUpdate:show":o[3]||(o[3]=e=>_(U)?U.value=e:null),title:h(M)("file.remoteDownloadModal.title"),width:500,footer:!0,onConfirm:I},{default:m((()=>[w("div",l,[g(i,{ref_key:"formRef",ref:k,model:h(E),rules:q},{default:m((()=>[g(u,{label:h(M)("file.remoteDownloadModal.urlAddress"),path:"url"},{default:m((()=>[w("div",b,[g(r,{value:h(E).url,"onUpdate:value":[o[0]||(o[0]=e=>h(E).url=e),S]},null,8,["value"])])])),_:1},8,["label"]),g(u,{label:h(M)("file.remoteDownloadModal.downloadTo"),path:"path"},{default:m((()=>[w("div",j,[g(r,{value:h(E).path,"onUpdate:value":o[1]||(o[1]=e=>h(E).path=e)},null,8,["value"])])])),_:1},8,["label"]),g(u,{label:h(M)("file.remoteDownloadModal.fileName"),path:"filename"},{default:m((()=>[w("div",x,[g(r,{value:h(E).filename,"onUpdate:value":o[2]||(o[2]=e=>h(E).filename=e)},null,8,["value"])])])),_:1},8,["label"])])),_:1},8,["model"])])])),_:1},8,["show","title"])}}}))}}}));
