import{I as x}from"./ItemsListing-e8i_b9av.js";import{r as d,a as f,M as V,_ as B}from"./index-Cc0s9xHj.js";import{d as I,c as i,J as C,H as F,g as b,u as N,aV as P,r as S,e as E,F as L,O,G as j,K as D,a4 as k,b as r}from"./lucide-C_a_D9Y7.js";import{d as M}from"./vuetify-CvGbteJu.js";import{u as T}from"./vue-i18n-COI_JhGQ.js";import"./Container-C8q3OdIF.js";import"./index-kQIztB-E.js";import"./Toolbar-CpDb2XyG.js";import"./userPreferences-CgJSfdV_.js";import"./vue-router-lrCq0UAu.js";import"./Button-CCvS9sA_.js";import"./ListItem-Ct4Nbn6d.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DhKX4Vvj.js";import"./MediaItemThumb-CN3YtoJY.js";import"./ProviderIcon.vue_vue_type_style_index_0_lang-7ardqVNw.js";import"./PanelviewItemCompact-CL6Psz6q.js";import"./qrcode-DICVlH4J.js";import"./marked-D9eDbhZJ.js";import"./color-CqFg8eif.js";import"./vueuse-Blk5jQ0T.js";/* empty css            */import"./swiper-UowLVX5q.js";const q={class:"breadcrumb-container"},z=["onClick"],G={key:1,class:"breadcrumb-text"},H=I({__name:"BrowseView",props:{path:{}},setup(l){const s=l,{t:g}=T(),m=S(!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===V.FOLDER),a},y=e=>{e===null?d.push({name:"browse"}):d.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:N(P),title:w.value},{title:F(()=>[E("div",q,[(r(!0),i(L,null,O(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=B(H,[["__scopeId","data-v-e24b2804"]]);export{mt as default};
