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