const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/index-B6Y_2X_r.js?v=1773287522785","js/vue-core-DJjvd5ZC.js?v=1773287522785","js/prismjs-BZPoR7_J.js?v=1773287522785","css/prismjs-D-3FhBe_.css?v=1773287522785","js/index-BTglIPU2.js?v=1773287522785","js/naive-ui--dJnpVcV.js?v=1773287522785","css/index-DEM1fxGq.css?v=1773287522785","js/files-BUbkyTRl.js?v=1773287522785","css/index-FEE1lr_F.css?v=1773287522785"])))=>i.map(i=>d[i]);
import{l as U,x as V,p as j,P as E}from"./index-BTglIPU2.js?v=1773287522785";import{_ as I}from"./index.vue_vue_type_script_setup_true_lang-D8O2mMsP.js?v=1773287522785";import{A as N,$ as O,w as D,Q as K}from"./FileIcon-eIHDRaxH.js?v=1773287522785";import{a1 as Q,a6 as W,au as X,b as q,B as G}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{k as H,R as J,i as Y,r as n,w as Z,$ as ee,a8 as oe,a9 as u,_ as ne,a0 as e,S as t,X as h,a3 as te,n as C}from"./vue-core-DJjvd5ZC.js?v=1773287522785";import"./prismjs-BZPoR7_J.js?v=1773287522785";import"./soft-Cjyfamvm.js?v=1773287522785";import"./copy-D-wIKr0q.js?v=1773287522785";const ae={class:"p-20px pt-28px"},fe=H({__name:"Compression",setup(le,{expose:$}){const{t:a}=J(),v=Y("fileStore"),{choosedKeys:l,currentPath:d,fileList:x}=v,p=n(!1),r=n(""),m=n(""),s=n(""),o=n("tar.gz"),f=n(d.value),z=n([{label:"tar.gz",value:"tar.gz"},{label:"zip",value:"zip"},{label:"rar",value:"rar"}]),_=N(x.value,l.value)[0];Z(o,()=>C(g));function g(){l.value.length==1?s.value="".concat(f.value,"/").concat(_.nm,".").concat(o.value):l.value.length>1&&(s.value="".concat(f.value,"/").concat(d.value.split("/").pop(),".").concat(o.value))}function k(){p.value=!0,l.value.length==1?(m.value=_.nm,_.type=="dir"?r.value=a("file.compressionModal.compressFolder",{name:_.nm}):r.value=a("file.compressionModal.compressFile",{name:_.nm})):l.value.length>1&&(m.value=l.value.join(","),r.value=a("file.compressionModal.compressFolderAndFile",{names:m.value})),g()}function y(){p.value=!1}function F(){j({title:a("Component.SelectPath.index_7"),width:750,height:640,footer:!1,data:{path:f.value,callback:b=>{f.value=b,C(g)}},component:te(()=>E(()=>import("./index-B6Y_2X_r.js?v=1773287522785"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))})}async function M(){await O(m.value,s.value,o.value,d.value),D(v),K(v)}return $({open:k,close:y}),(b,i)=>{const P=W,w=Q,B=q,R=U,T=G,A=X,L=I,S=V;return ee(),oe(S,{show:t(p),"onUpdate:show":i[2]||(i[2]=c=>h(p)?p.value=c:null),width:480,title:t(r),footer:!0,onConfirm:M},{default:u(()=>[ne("div",ae,[e(L,null,{default:u(()=>[e(w,{label:t(a)("file.compressionModal.compressType")},{default:u(()=>[e(P,{value:t(o),"onUpdate:value":i[0]||(i[0]=c=>h(o)?o.value=c:null),options:t(z)},null,8,["value","options"])]),_:1},8,["label"]),e(w,{label:t(a)("file.compressionModal.compressPath")},{default:u(()=>[e(A,null,{default:u(()=>[e(B,{value:t(s),"onUpdate:value":i[1]||(i[1]=c=>h(s)?s.value=c:null)},null,8,["value"]),e(T,{onClick:F},{icon:u(()=>[e(R,{name:"file-dir",size:"20"})]),_:1})]),_:1})]),_:1},8,["label"])]),_:1})])]),_:1},8,["show","title"])}}});export{fe as default};
