import{_ as e}from"./index.js?v=1764233927359";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang.js?v=1764233927359";import{_ as l}from"./page_layout.js?v=1764233927359";import{f as o,k as s,g as n,b as t}from"./index39.js?v=1764233927359";import{R as u}from"./ResourceManagerWindow.js?v=1764233927359";import{dR as r,dV as i,av as p,au as v,aC as c}from"./naive.js?v=1764233927359";import{k as m,P as f,i as d,av as _,r as j,w as h,R as g,V as b,W as w,a3 as x,S as y,U as z,ak as M,F as R,n as k}from"./vue.js?v=1764233927359";import"./common.js?v=1764233927359";import"./__commonjsHelpers__.js?v=1764233927359";import"./public.js?v=1764233927359";import"./soft2.js?v=1764233927359";import"./soft.js?v=1764233927359";import"./site.js?v=1764233927359";import"./file2.js?v=1764233927359";import"./index.vue_vue_type_script_setup_true_lang7.js?v=1764233927359";const C={class:"p-20px pt-28px"},F=m({__name:"Compression",setup(m,{expose:F}){const{t:U}=f(),W=d("fileStore"),{choosedKeys:P,currentPath:S,fileList:V}=W,A=_("resourceWindowRef"),D=j(!1),H=j(""),K=j(""),L=j(""),T=j("tar.gz"),q=j(S.value),B=j([{label:"tar.gz",value:"tar.gz"},{label:"zip",value:"zip"},{label:"rar",value:"rar"}]),E=o(V.value,P.value)[0];function G(){1==P.value.length?L.value="".concat(q.value,"/").concat(E.nm,".").concat(T.value):P.value.length>1&&(L.value="".concat(q.value,"/").concat(S.value.split("/").pop(),".").concat(T.value))}function I(){var e;null==(e=A.value)||e.open()}function J(e){q.value=e,k(G)}async function N(){await s(K.value,L.value,T.value,S.value),n(W),t(W)}return h(T,()=>k(G)),F({open:function(){D.value=!0,1==P.value.length?(K.value=E.nm,"dir"==E.type?H.value=U("file.compressionModal.compressFolder",{name:E.nm}):H.value=U("file.compressionModal.compressFile",{name:E.nm})):P.value.length>1&&(K.value=P.value.join(","),H.value=U("file.compressionModal.compressFolderAndFile",{names:K.value})),G()},close:function(){D.value=!1}}),(o,s)=>{const n=i,t=r,m=v,f=l,d=c,_=p,j=a,h=e;return b(),g(R,null,[w(h,{show:z(D),"onUpdate:show":s[2]||(s[2]=e=>M(D)?D.value=e:null),width:480,title:z(H),footer:!0,onConfirm:N},{default:x(()=>[y("div",C,[w(j,null,{default:x(()=>[w(t,{label:z(U)("file.compressionModal.compressType")},{default:x(()=>[w(n,{value:z(T),"onUpdate:value":s[0]||(s[0]=e=>M(T)?T.value=e:null),options:z(B)},null,8,["value","options"])]),_:1},8,["label"]),w(t,{label:z(U)("file.compressionModal.compressPath")},{default:x(()=>[w(_,null,{default:x(()=>[w(m,{value:z(L),"onUpdate:value":s[1]||(s[1]=e=>M(L)?L.value=e:null)},null,8,["value"]),w(d,{onClick:I},{icon:x(()=>[w(f,{name:"file-dir",size:"20"})]),_:1})]),_:1})]),_:1},8,["label"])]),_:1})])]),_:1},8,["show","title"]),w(u,{ref_key:"resourceWindowRef",ref:A,"current-path":z(S),onChooseDir:J},null,8,["current-path"])],64)}}});export{F as default};
