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