import{x as g,o as R,N as v,y as t,z as l,A as r,W as k,G as i,av as V,R as I,D as u,n as c,B as b,J as m,Y as C,S as A,F as M,E as B,M as p,a4 as y,H as _,I as $}from"./index-CFvoaD7J.js";import{P}from"./PanelviewItemCompact-BQIsDE0n.js";import{c as w,s as E}from"./ItemContextMenu.vue_vue_type_style_index_0_scoped_4409cede_lang-41DbVClm.js";import{w as T}from"./VListItem-CSPID7yq.js";import{V as D}from"./Toolbar-DNen7a-V.js";import{V as F}from"./VToolbar-Da4d1W_R.js";import{V as H}from"./VAlert-CIiIOQza.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";const S=g({__name:"Carousel",setup(h){return R(()=>{document.documentElement.style.setProperty("--swiper-navigation-color","primary")}),(n,f)=>{const d=v("swiper");return t(),l(d,{"slides-per-view":i(V)(n.$vuetify.display.width)+.5,"space-between":24,"free-mode":!0,navigation:!i(I)({breakpoint:"mobile"}),mousewheel:{forceToAxis:!0,releaseOnEdges:!0}},{default:r(()=>[k(n.$slots,"default")]),_:3},8,["slides-per-view","navigation"])}}}),L={class:"widget-row"},O={class:"mr-3"},W={key:1,class:"mr-3"},z=g({__name:"HomeWidgetRow",props:{widgetRow:{}},setup(h){const n=function(e,o,a){const s=Array.isArray(e)?e:[e];E(s,void 0,o,a)},f=function(e,o,a){if(!w(e)){n(e,o,a);return}e.media_type==p.FOLDER?y.push({name:"browse",query:{path:e.path}}):y.push({name:e.media_type,params:{itemId:e.item_id,provider:e.provider}})},d=function(e,o,a){if(!w(e)){n(e,o,a);return}if(!_.activePlayerId){_.showPlayersMenu=!0;return}$.playMedia(e.uri,void 0)};return(e,o)=>{const a=v("swiper-slide");return t(),u("div",L,[c(F,{class:"header",color:"transparent",style:C(e.widgetRow.path?"cursor: pointer; width: fit-content;":"width: fit-content;"),onClick:o[0]||(o[0]=s=>e.widgetRow.path?e.$router.push(e.widgetRow.path):"")},{prepend:r(()=>[c(T,{icon:e.widgetRow.icon},null,8,["icon"])]),title:r(()=>[e.widgetRow.count?(t(),l(D,{key:0,inline:"",color:"grey",content:e.widgetRow.count},{default:r(()=>[b("span",O,m(e.$t(e.widgetRow.label)),1)]),_:1},8,["content"])):(t(),u("span",W,m(e.$t(e.widgetRow.label)),1))]),_:1},8,["style"]),e.widgetRow.items.length==0?(t(),l(H,{key:0},{default:r(()=>[A(m(e.$t("no_content")),1)]),_:1})):(t(),l(S,{key:1},{default:r(()=>[(t(!0),u(M,null,B(e.widgetRow.items,s=>(t(),l(a,{key:s.uri},{default:r(()=>[c(P,{item:s,"permanent-overlay":![i(p).ALBUM,i(p).TRACK,i(p).RADIO].includes(s.media_type),"is-available":i(w)(s),onMenu:n,onClick:f,onPlay:d},null,8,["item","permanent-overlay","is-available"])]),_:2},1024))),128))]),_:1}))])}}}),X=N(z,[["__scopeId","data-v-148567cc"]]);export{X as H};
