import{_ as a}from"./index.js?v=1764233927359";import{q as e,_ as s,T as i,cr as l,a9 as n,p as o}from"./page_layout.js?v=1764233927359";import{k as t,P as r,i as c,r as u,a2 as d,V as v,a3 as m,S as f,W as p,U as h,R as k,F as w,O as y,j as M,a4 as g,au as _,ak as C,n as x}from"./vue.js?v=1764233927359";import{C as P,d as j,r as $}from"./index39.js?v=1764233927359";const z={class:"select-main"},R={class:"p-20px"},D={class:"resource-view"},S={class:"directory"},T=["onClick"],U={class:"file-list"},W={class:"list-tit"},b={class:"name"},q={class:"modify"},F={class:"permission"},I={class:"owner"},N=["onClick"],O={class:"name"},V={class:"modify"},A=o(t({__name:"ResourceManagerWindow",props:{currentPath:{type:String,default:"/"}},emits:["chooseDir"],setup(o,{expose:t,emit:A}){const B=o,E=A,{t:G}=r(),H=c("fileStore"),{diskMountPoint:J}=H;t({open:function(){L.value=!0,Z()},close:function(){L.value=!1}});const K=u(B.currentPath),L=u(!1),Q=u([]),X=u(!1),Y=u("");async function Z(){try{X.value=!0,Q.value=await $(K.value)}catch(a){console.warn(a)}finally{X.value=!1,Y.value=""}}function aa(a){K.value=a,x(Z)}function ea(){Y.value?E("chooseDir",K.value+"/"+Y.value):E("chooseDir",K.value),L.value=!1}return(o,t)=>{const r=e,c=s,u=l,$=i,A=a;return v(),d(A,{show:h(L),"onUpdate:show":t[0]||(t[0]=a=>C(L)?L.value=a:null),title:o.$t("file.resourceManagerModal.title"),width:750,footer:!0,onConfirm:ea},{default:m(()=>[f("div",z,[f("div",R,[p(P,{ref:"choosePathRef","current-path":h(K),onPathChange:aa},null,8,["current-path"])]),p(r),f("div",D,[f("div",S,[(v(!0),k(w,null,y(h(J),(a,e)=>(v(),k("div",{class:"dir-item",key:e,onClick:e=>{return s=a.path,K.value=s,void x(Z);var s}},[p(c,{name:"file-disk",size:"18"}),M(" "+g(a.path)+" ("+g(a.size[2])+") ",1)],8,T))),128))]),f("div",U,[f("div",W,[f("div",b,g(o.$t("file.resourceManagerModal.fileName")),1),f("div",q,g(o.$t("file.resourceManagerModal.modificationTime")),1),f("div",F,g(o.$t("file.resourceManagerModal.permission")),1),f("div",I,g(o.$t("file.resourceManagerModal.owner")),1)]),p($,{show:h(X)},{default:m(()=>[p(u,{style:{height:"460px"}},{default:m(()=>[(v(!0),k(w,null,y(h(Q),a=>(v(),k("div",{class:"list-content",key:a.nm,onClick:e=>function(a){"dir"===a.type&&(K.value="/"==K.value?"/".concat(a.nm):K.value+"/"+a.nm,x(Z))}(a)},[f("div",O,[p(c,{name:h(Y)==a.nm?"file-checked":"file-unchecked",size:"16",onClick:_(e=>{return s=a,void(Y.value=s.nm);var s},["stop"])},null,8,["name","onClick"]),p(c,{name:h(j)(a.ext),size:"24"},null,8,["name"]),f("span",null,g(a.nm),1)]),f("div",V,g(h(n)(a.mt)),1),t[1]||(t[1]=f("div",{class:"permission"},"755",-1)),t[2]||(t[2]=f("div",{class:"owner"},"root",-1))],8,N))),128))]),_:1})]),_:1},8,["show"])])])])]),_:1},8,["show","title"])}}}),[["__scopeId","data-v-19bc9c68"]]);export{A as R};
