import{I as x}from"./ItemsListing-KtvqXRYj.js";import{r as f,f as d,M as I,_ as B}from"./index-Cpyo7KMo.js";import{d as V,b as i,H as C,E,f as F,F as N,M as P,c as b,u as S,aG as D,r as L,e as r,D as M,I as j,a1 as k}from"./lucide-CCrbsyJI.js";import{d as O}from"./vuetify-DEtiqX2e.js";import{u as T}from"./vue-i18n-krBRuO6q.js";import"./Container-DYZU9MIY.js";import"./index-kQIztB-E.js";import"./Toolbar-D8YIoiCi.js";import"./userPreferences-6opwxEkN.js";import"./vue-router-D-D-f2lE.js";import"./Button-C0UlHjBg.js";import"./ListItem-CIldTlv1.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-BERW6gDd.js";import"./MediaItemThumb-D8fpTfkJ.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-BGdiLcR-.js";import"./PanelviewItemCompact-BAfN9DpK.js";import"./color-CcshWhNz.js";import"./qrcode-CCHMWIXh.js";import"./marked-i_gIkIP3.js";import"./vueuse-FEBxOGD_.js";/* empty css            */import"./swiper-YiD1SI-4.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=L(!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===I.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:S(D),title:g.value},{title:E(()=>[F("div",q,[(r(!0),i(N,null,P(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(),M(O,{key:2,icon:"mdi-chevron-right",size:"small",class:"breadcrumb-separator"})):j("",!0)]))),128))])]),_:1},8,["show-select-button","path","icon","title"])]))}}),mt=B(H,[["__scopeId","data-v-e24b2804"]]);export{mt as default};
