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