import{l as _,L as V,a6 as g,r as c,o as k,w as b,v as s,A as f,j as o,y as n,N as B,J as d,q as v,D as l,x as h,H as C,M as D,an as L}from"./index-dcf0de03.js";import{L as N,s as x}from"./ListviewItem-2c46c8ee.js";/* empty css                             */import{C as M}from"./Container-d623752d.js";import{V as T}from"./VBadge-8be61727.js";import{V as $}from"./VToolbar-dfba6de4.js";import{b as q}from"./VMenu-3bdd1b96.js";import{k as E}from"./VBtn-a0da5efe.js";import"./MediaItemThumb.vue_vue_type_style_index_0_lang-b38d9ae1.js";import"./ListItem-6dad7331.js";import"./VListItem-943ee224.js";import"./VCheckboxBtn-d54a899d.js";import"./index-0afee102.js";import"./VCard-111cabcf.js";/* empty css              */const F={key:0},Y=_({__name:"BrowseView",props:{path:{}},setup(w){const p=w;V();const m=g(),t=c(),i=c(!1),u=async function(){i.value=!0,t.value=await C.browse(p.path),i.value=!1};k(()=>{u()}),b(()=>p.path,()=>{u()});const y=function(e){e.media_type===D.FOLDER?m.push({name:"browse",query:{path:e.path}}):m.push({name:e.media_type,params:{itemId:e.item_id,provider:e.provider}})};return(e,R)=>(s(),f("section",null,[o($,{variant:"flat",color:"transparent",style:{height:"50px"}},{title:n(()=>{var a,r;return[B(d(e.$t("browse"))+" ",1),t.value&&t.value.provider!="library"?(s(),f("span",F," | "+d(v(L)(t.value,e.$t)),1)):l("",!0),(a=t.value)!=null&&a.items?(s(),h(T,{key:1,color:"grey",content:(r=t.value)==null?void 0:r.items.length,inline:""},null,8,["content"])):l("",!0)]}),_:1}),o(q),o(M,null,{default:n(()=>{var a;return[i.value?(s(),h(E,{key:0,indeterminate:""})):l("",!0),o(v(x),{items:((a=t.value)==null?void 0:a.items)||[],"item-size":66,"key-field":"uri","page-mode":""},{default:n(({item:r})=>[o(N,{item:r,"show-library":!1,"show-menu":!1,"show-provider":!1,"is-selected":!1,onClick:y},null,8,["item"])]),_:1},8,["items"])]}),_:1})]))}});export{Y as default};
