System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./index-legacy-CdzM8gmn.js?v=1773287522785","./FileIcon-legacy-CYrICTNK.js?v=1773287522785","./ShareDetail.vue_vue_type_script_setup_true_lang-legacy-Cll6gIn0.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./soft-legacy-CzxZ2w7j.js?v=1773287522785","./copy-legacy-CoXPjkKf.js?v=1773287522785"],(function(e,a){"use strict";var l,t,s,u,n,o,r,i,d,f,c,p,v,_,h,y,m,g,x,j,w,M,b,S,k,D,U,F,C;return{setters:[e=>{l=e.a3,t=e.x,s=e.as,u=e.i},e=>{n=e._},e=>{o=e.g},e=>{r=e.w},e=>{i=e._},e=>{d=e.a1,f=e.b,c=e.a3,p=e.a4,v=e.B},e=>{_=e.k,h=e.i,y=e.al,m=e.r,g=e.c,x=e.$,j=e.Z,w=e.a0,M=e.a9,b=e._,S=e.S,k=e.j,D=e.aa,U=e.X,F=e.F,C=e.N},null,null,null],execute:function(){const a={class:"p-20px"};e("default",_({__name:"Share",setup(e,{expose:_}){const{t:L}=l.global,N=h("fileStore"),{choosedKeys:R,fileList:Z}=N,q=y("shareDetailRef"),B=m(!1),E=g((()=>"dir"==I.value.type?L("file.shareModal.setShareFolder",{name:I.value.nm}):L("file.shareModal.setShareFile",{name:I.value.nm}))),I=m({}),K=m({filename:"",ps:"",password:"",expire:24});async function O(){const{message:e}=await s.post("/files?action=create_download_url",C(K.value),{requestOptions:{loading:L("file.shareModal.creatingShareLink")}});u(e)&&(B.value=!1,q.value?.open(e),r(N))}function W(){K.value.password=o(8)}return _({open:function(){B.value=!0;const e=Z.value.find((e=>R.value[0]==e.nm));I.value=e,K.value.ps=I.value.nm,K.value.filename=I.value.path},close:function(){B.value=!1}}),(e,l)=>{const s=f,u=d,o=p,r=c,_=v,h=n,y=t;return x(),j(F,null,[w(y,{show:S(B),"onUpdate:show":l[3]||(l[3]=e=>U(B)?B.value=e:null),title:S(E),width:560,footer:!0,"confirm-text":S(L)("file.shareModal.create"),onConfirm:O},{default:M((()=>[b("div",a,[w(h,null,{default:M((()=>[w(u,{label:S(L)("file.shareModal.shareName")},{default:M((()=>[w(s,{value:S(K).ps,"onUpdate:value":l[0]||(l[0]=e=>S(K).ps=e)},null,8,["value"])])),_:1},8,["label"]),w(u,{label:S(L)("file.shareModal.expirationDate")},{default:M((()=>[w(r,{value:S(K).expire,"onUpdate:value":l[1]||(l[1]=e=>S(K).expire=e)},{default:M((()=>[w(o,{value:24},{default:M((()=>[k(D(S(L)("file.shareModal.aDay")),1)])),_:1}),w(o,{value:168},{default:M((()=>[k(D(S(L)("file.shareModal.aWeek")),1)])),_:1}),w(o,{value:1130800},{default:M((()=>[k(D(S(L)("file.shareModal.permanent")),1)])),_:1})])),_:1},8,["value"])])),_:1},8,["label"]),w(u,{label:S(L)("file.shareModal.extractionCode"),"show-feedback":!1},{default:M((()=>[w(s,{value:S(K).password,"onUpdate:value":l[2]||(l[2]=e=>S(K).password=e)},null,8,["value"]),w(_,{class:"ml-10px",type:"primary",onClick:W},{default:M((()=>[k(D(S(L)("file.shareModal.random")),1)])),_:1})])),_:1},8,["label"])])),_:1})])])),_:1},8,["show","title","confirm-text"]),w(i,{ref_key:"shareDetailRef",ref:q},null,512)],64)}}}))}}}));
