import{aA as C,b as t,af as I,a7 as v,r as S,P as F,_ as U}from"./app-QjDgb7aF.js";import{M as D}from"./MkFileListForAdmin-DZRcKdif.js";import{l as P}from"./lookup-file-B8nYR5PV.js";import{b as A,f as g,E as _,j as B,p as E,k as o,i as s,q as d,I as c,u as a,D as u,J as f,a as m}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";import"./MkPagination-DzUgufpZ.js";import"./bytes-C39hD0JB.js";const H={class:"xrmjdkdw"},N={class:"inputs",style:{display:"flex",gap:"var(--margin)","flex-wrap":"wrap"}},j={value:"combined"},q={value:"local"},J={value:"remote"},L={class:"inputs",style:{display:"flex",gap:"var(--margin)","flex-wrap":"wrap","padding-top":"1.2em"}},R=A({__name:"files",setup(T){let p=m("local"),n=m(null),i=m(""),r=m(""),x=m("grid");const h={endpoint:"admin/drive/files",limit:10,params:g(()=>({type:n.value&&n.value!==""?n.value:null,userId:r.value&&r.value!==""?r.value:null,origin:p.value,hostname:i.value&&i.value!==""?i.value:null}))};function k(){S({type:"warning",text:t.ts.clearCachedFilesConfirm}).then(({canceled:y})=>{y||F("admin/drive/clean-remote-files",{})})}const b=g(()=>[{text:t.ts.lookup,icon:"ph-magnifying-glass ph-bold ph-lg",handler:P},{text:t.ts.clearCachedFiles,icon:"ph-trash ph-bold ph-lg",handler:k}]);return C(g(()=>({title:t.ts.files,icon:"ph-cloud ph-bold ph-lg"}))),(y,e)=>{const V=_("MkPageHeader"),M=_("MkSpacer"),w=_("MkStickyContainer");return B(),E("div",null,[o(w,null,{header:s(()=>[o(V,{actions:b.value},null,8,["actions"])]),default:s(()=>[o(M,{"content-max":900},{default:s(()=>[d("div",H,[d("div",null,[d("div",N,[o(I,{modelValue:a(p),"onUpdate:modelValue":e[0]||(e[0]=l=>c(p)?p.value=l:p=l),style:{margin:"0",flex:"1"}},{label:s(()=>[f(u(a(t).ts.instance),1)]),default:s(()=>[d("option",j,u(a(t).ts.all),1),d("option",q,u(a(t).ts.local),1),d("option",J,u(a(t).ts.remote),1)]),_:1},8,["modelValue"]),o(v,{modelValue:a(i),"onUpdate:modelValue":e[1]||(e[1]=l=>c(i)?i.value=l:i=l),debounce:!0,type:"search",style:{margin:"0",flex:"1"},disabled:h.params.origin==="local"},{label:s(()=>[f(u(a(t).ts.host),1)]),_:1},8,["modelValue","disabled"])]),d("div",L,[o(v,{modelValue:a(r),"onUpdate:modelValue":e[2]||(e[2]=l=>c(r)?r.value=l:r=l),debounce:!0,type:"search",style:{margin:"0",flex:"1"}},{label:s(()=>[...e[4]||(e[4]=[f("User ID",-1)])]),_:1},8,["modelValue"]),o(v,{modelValue:a(n),"onUpdate:modelValue":e[3]||(e[3]=l=>c(n)?n.value=l:n=l),debounce:!0,type:"search",style:{margin:"0",flex:"1"}},{label:s(()=>[...e[5]||(e[5]=[f("MIME type",-1)])]),_:1},8,["modelValue"])]),o(D,{pagination:h,"view-mode":a(x)},null,8,["view-mode"])])])]),_:1})]),_:1})])}}}),Z=U(R,[["__scopeId","data-v-2ebe5819"]]);export{Z as default};
//# sourceMappingURL=files-OCwLctlr.js.map
