import{I as x}from"./ItemsListing-D6AMqIYc.js";import{c as f,r as d,M as I,_ as B}from"./index-CxiRlsCY.js";import{d as V,r as C,c as b,b as i,e as r,H as E,E as F,f as N,F as P,M as S,u as D,ay as L,D as M,I as j,a1 as k}from"./lucide-C2DU1LFb.js";import{d as O}from"./vuetify-RelkxOq-.js";import{u as T}from"./vue-i18n-DySrp6mW.js";import"./Container-CwfZ2VgM.js";import"./index-kQIztB-E.js";import"./utils-CDN07tui.js";import"./Toolbar-MwYpbj3t.js";import"./userPreferences-ln7cf3P6.js";import"./vue-router-BgJK_hRC.js";import"./Button-DBt8j7D4.js";import"./ListItem-DzUpG5Dm.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-D7lqdhVg.js";import"./MediaItemThumb-C7OhU3lK.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-C17dV9_V.js";import"./PanelviewItemCompact-Cjl_ij1h.js";import"./qrcode-DSFhiIp2.js";import"./marked-C0Rlrcoy.js";import"./color-BTziYnFN.js";import"./vueuse-DIaEWNCo.js";/* empty css            */import"./swiper-Jy9GbtzK.js";const q={class:"breadcrumb-container"},z=["onClick"],H={key:1,class:"breadcrumb-text"},R=V({__name:"BrowseView",props:{path:{}},setup(l){const s=l,{t:w}=T(),m=C(!1),g=b(()=>""),h=b(()=>{const e=[];if(e.push({text:w("browse"),path:null,clickable:s.path&&s.path!=="root"||!1}),s.path&&s.path!=="root")if(s.path.includes("://")){const[a,t]=s.path.split("://"),o=a+"://",n=f.getProviderName(a);if(e.push({text:n,path:o,clickable:t&&t.length>0||!1}),t&&t.length>0){const c=t.split("/").filter(p=>p.length>0);c.forEach((p,u)=>{const _=o+c.slice(0,u+1).join("/");e.push({text:p,path:_,clickable:u<c.length-1})})}}else{const a=s.path.split("/").filter(t=>t.length>0);a.forEach((t,o)=>{const n=a.slice(0,o+1).join("/");e.push({text:t,path:n,clickable:o<a.length-1})})}return e}),v=async function(e){const a=await f.browse(s.path);return m.value=a.every(t=>t.media_type===I.FOLDER),a},y=e=>{e===null?d.push({name:"browse"}):d.push({name:"browse",query:{path:e}})};return(e,a)=>(r(),i("section",null,[E(x,{itemtype:"browse","show-provider":!1,"show-library":!1,"show-favorites-only-filter":!1,"show-track-number":!1,"show-select-button":!!(l.path&&l.path!="root"&&!m.value),"load-items":v,"sort-keys":["original","name","name_desc"],path:l.path,"allow-key-hooks":!0,icon:D(L),title:g.value},{title:F(()=>[N("div",q,[(r(!0),i(P,null,S(h.value,(t,o)=>(r(),i("span",{key:o,class:"breadcrumb-segment"},[t.clickable?(r(),i("button",{key:0,class:"breadcrumb-link",onClick:n=>y(t.path)},k(t.text),9,z)):(r(),i("span",H,k(t.text),1)),o<h.value.length-1?(r(),M(O,{key:2,icon:"mdi-chevron-right",size:"small",class:"breadcrumb-separator"})):j("",!0)]))),128))])]),_:1},8,["show-select-button","path","icon","title"])]))}}),ht=B(R,[["__scopeId","data-v-e24b2804"]]);export{ht as default};
