import{I as _}from"./ItemsListing-t4zttHcu.js";import{U as v,bt as y,c as m,a0 as l,X as i,F as I,Y as B,E as V,I as x,a1 as C,W as S,ab as E,ad as h,ar as P,b6 as u,a6 as N}from"./index-B-lUZalq.js";import{_ as j}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Container-Br6JH6Pm.js";import"./Button-kSJGA_Pw.js";import"./VBtn-BPJ1JKW-.js";import"./VContainer-DB65WVbe.js";/* empty css              */import"./Toolbar-BvxWbi_E.js";import"./VToolbar-RljK0PC9.js";import"./ListItem-LV_WU--g.js";import"./NowPlayingBadge.vue_vue_type_style_index_0_lang-DnroVGI-.js";import"./VInput-BWBQqjuk.js";import"./MediaItemThumb-DapaMoP4.js";import"./PanelviewItemCompact-CIDxIfoQ.js";import"./VSpacer-DDLrofv-.js";import"./VTextField-B-d5Pe9I.js";import"./VInfiniteScroll-CKZj-VKd.js";import"./layout-BuzUTwrQ.js";import"./VRow-BQOTE9C_.js";import"./VVirtualScroll-CceW16X7.js";import"./VAlert-QHTIcuEJ.js";const F={class:"breadcrumb-container"},L=["onClick"],q={key:1,class:"breadcrumb-text"},z=v({__name:"BrowseView",props:{path:{}},setup(b){const s=b,{t:f}=y(),d=m(()=>""),p=m(()=>{const e=[];if(e.push({text:f("browse"),path:null,clickable:s.path&&s.path!=="root"||!1}),s.path&&s.path!=="root")if(s.path.includes("://")){const[o,t]=s.path.split("://"),a=o+"://";if(e.push({text:a,path:a,clickable:t&&t.length>0||!1}),t&&t.length>0){const r=t.split("/").filter(n=>n.length>0);r.forEach((n,c)=>{const g=a+r.slice(0,c+1).join("/");e.push({text:n,path:g,clickable:c<r.length-1})})}}else{const o=s.path.split("/").filter(t=>t.length>0);o.forEach((t,a)=>{const r=o.slice(0,a+1).join("/");e.push({text:t,path:r,clickable:a<o.length-1})})}return e}),k=async function(e){return await N.browse(s.path)},w=e=>{e===null?u.push({name:"browse"}):u.push({name:"browse",query:{path:e}})};return(e,o)=>(i(),l("section",null,[I(_,{itemtype:"browse","show-provider":!1,"show-library":!1,"show-favorites-only-filter":!1,"show-track-number":!1,"show-select-button":!!(e.path&&e.path!="root"),"load-items":k,"sort-keys":["original","name","name_desc"],path:e.path,"allow-key-hooks":!0,icon:"mdi-folder-outline",title:d.value},{title:B(()=>[V("div",F,[(i(!0),l(x,null,C(p.value,(t,a)=>(i(),l("span",{key:a,class:"breadcrumb-segment"},[t.clickable?(i(),l("button",{key:0,class:"breadcrumb-link",onClick:r=>w(t.path)},h(t.text),9,L)):(i(),l("span",q,h(t.text),1)),a<p.value.length-1?(i(),S(P,{key:2,icon:"mdi-chevron-right",size:"small",class:"breadcrumb-separator"})):E("",!0)]))),128))])]),_:1},8,["show-select-button","path","title"])]))}}),rt=j(z,[["__scopeId","data-v-9af508f0"]]);export{rt as default};
