import{I as x}from"./ItemsListing-f-FPwy3I.js";import{r as d,a as f,M as B,_ as I}from"./index-CPxkwG0x.js";import{d as P,c as i,J as S,H as V,g as b,u as C,aS as F,r as N,e as E,F as L,P as j,G as D,K as M,a4 as k,b as r}from"./lucide-6UWTdd2w.js";import{d as O}from"./vuetify-C-X2RQxn.js";import{u as T}from"./vue-i18n-QBroYIqB.js";import"./Container-B6VkeYSC.js";import"./index-kQIztB-E.js";import"./Toolbar-DQiKn9AU.js";import"./userPreferences-XbI9T1gA.js";import"./vue-router-DseMGm2G.js";import"./Button-DvEMCWqy.js";import"./ListItem-CuKsNkGi.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-ChrddRO9.js";import"./MediaItemThumb-Cl_l8wCt.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-BKnSpmLb.js";import"./PanelviewItemCompact-CiNH82et.js";import"./qrcode-DG5BmHWw.js";import"./marked-BPdRUrA1.js";import"./color-CqFg8eif.js";import"./vueuse-BmOENVLt.js";/* empty css            */import"./swiper-7FOSZ2nt.js";const q={class:"breadcrumb-container"},z=["onClick"],G={key:1,class:"breadcrumb-text"},H=P({__name:"BrowseView",props:{path:{}},setup(l){const s=l,{t:g}=T(),m=N(!1),w=b(()=>""),h=b(()=>{const e=[];if(e.push({text:g("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===B.FOLDER),a},y=e=>{e===null?d.push({name:"browse"}):d.push({name:"browse",query:{path:e}})};return(e,a)=>(r(),i("section",null,[S(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:C(F),title:w.value},{title:V(()=>[E("div",q,[(r(!0),i(L,null,j(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(),D(O,{key:2,icon:"mdi-chevron-right",size:"small",class:"breadcrumb-separator"})):M("",!0)]))),128))])]),_:1},8,["show-select-button","path","icon","title"])]))}}),mt=I(H,[["__scopeId","data-v-e24b2804"]]);export{mt as default};
