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