import{I as x}from"./ItemsListing-DdSUpMhP.js";import{r as f,a as d,M as B,_ as I}from"./index-CKxLfxpS.js";import{d as V,b as i,J as C,H as F,f as N,F as P,O as S,c as b,u as E,aQ as L,r as O,e as r,G as j,K as D,a4 as k}from"./lucide-UY9XeFdQ.js";import{d as M}from"./vuetify-C0IIhwYL.js";import{u as T}from"./vue-i18n-DwYfJ_fn.js";import"./Container-B1UOd5ED.js";import"./index-kQIztB-E.js";import"./Toolbar-Da01lZeW.js";import"./userPreferences-BgjK7xB_.js";import"./vue-router-DNlH4vva.js";import"./Button-DdCpYaoc.js";import"./ListItem-BP0lui-9.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-CnaMVQug.js";import"./MediaItemThumb-DiY2t3Gt.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-DYXAnx83.js";import"./PanelviewItemCompact-BhrDAsYI.js";import"./color-CcshWhNz.js";import"./qrcode-CJNXjF_3.js";import"./marked-D9eDbhZJ.js";import"./vueuse-Dj-fx4H6.js";/* empty css            */import"./swiper-DNx4mJDO.js";const q={class:"breadcrumb-container"},z=["onClick"],G={key:1,class:"breadcrumb-text"},H=V({__name:"BrowseView",props:{path:{}},setup(l){const s=l,{t:w}=T(),m=O(!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=d.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 d.browse(s.path);return m.value=a.every(t=>t.media_type===B.FOLDER),a},y=e=>{e===null?f.push({name:"browse"}):f.push({name:"browse",query:{path:e}})};return(e,a)=>(r(),i("section",null,[C(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:E(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",G,k(t.text),1)),o<h.value.length-1?(r(),j(M,{key:2,icon:"mdi-chevron-right",size:"small",class:"breadcrumb-separator"})):D("",!0)]))),128))])]),_:1},8,["show-select-button","path","icon","title"])]))}}),mt=I(H,[["__scopeId","data-v-e24b2804"]]);export{mt as default};
