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