import{D as C,g as A,G as x,M as m,_ as I}from"./index-CyXUjyDM.js";import{d as f,o as $,D as i,av as k,u as s,E as a,h as p,e as t,b as u,ad as R,H as c,f as v,I as l,P as B,a1 as y,b4 as V,F as M,M as P,$ as D}from"./lucide-BsOfcLnq.js";import{P as E}from"./PanelviewItemCompact-Dlf-jeIa.js";import{_ as T}from"./ProviderIcon.vue_vue_type_style_index_0_lang-CsLTxntn.js";import{F as z,m as g,n as N,r as O}from"./vuetify-DHCm6MV9.js";const F=f({__name:"Carousel",setup(e){return $(()=>{document.documentElement.style.setProperty("--swiper-navigation-color","primary")}),(r,w)=>{const d=k("swiper");return t(),i(d,{"slides-per-view":s(C)(r.$vuetify.display.width)+.5,"free-mode":!0,navigation:!1,mousewheel:{forceToAxis:!0,releaseOnEdges:!0}},{default:a(()=>[p(r.$slots,"default")]),_:3},8,["slides-per-view"])}}}),S={class:"flex items-center group"},W={key:0},L={class:"carousel-wrapper"},q=f({__name:"WidgetRow",props:{widgetRow:{},editMode:{type:Boolean},showProviderOnCover:{type:Boolean},showActionIcon:{type:Boolean}},emits:["update:settings"],setup(e,{emit:r}){const w=r,d=()=>{e.widgetRow.action&&e.widgetRow.action()};return(b,o)=>{const h=k("swiper-slide");return t(),u("div",{class:R(`widget-row ${e.widgetRow.settings&&!e.widgetRow.settings.enabled?"disabled":""}`)},[c(z,{class:"header",color:"transparent"},{title:a(()=>[v("div",S,[v("span",{class:R(["mr-3",{"cursor-pointer group-hover:opacity-70":e.showActionIcon&&e.widgetRow.action}]),onClick:o[0]||(o[0]=n=>e.showActionIcon&&d())},y(e.widgetRow.title),3),e.showActionIcon&&e.widgetRow.action?(t(),i(s(V),{key:0,size:18,class:"cursor-pointer group-hover:opacity-70",onClick:d})):l("",!0)]),e.widgetRow.subtitle&&s(A)("bp6")?(t(),i(N,{key:0,inline:"",outlined:"",text:e.widgetRow.subtitle,density:"compact",size:"small"},null,8,["text"])):l("",!0)]),append:a(()=>[e.editMode&&e.widgetRow.settings?(t(),u("div",W,[e.widgetRow.settings.position!==0?(t(),i(g,{key:0,icon:"mdi-chevron-up",class:"enabled",onClick:o[1]||(o[1]=n=>w("update:settings",{...e.widgetRow.settings,position:e.widgetRow.settings.position-1}))})):l("",!0),c(g,{icon:"mdi-chevron-down",onClick:o[2]||(o[2]=n=>w("update:settings",{...e.widgetRow.settings,position:e.widgetRow.settings.position+1}))}),c(g,{icon:e.widgetRow.settings.enabled?"mdi-checkbox-marked":"mdi-checkbox-blank-outline",onClick:o[3]||(o[3]=n=>w("update:settings",{...e.widgetRow.settings,enabled:!e.widgetRow.settings.enabled}))},null,8,["icon"])])):e.showActionIcon&&e.widgetRow.icon?(t(),i(g,{key:1,icon:typeof e.widgetRow.icon=="string"?e.widgetRow.icon:void 0,variant:"text",onClick:d},{default:a(()=>[typeof e.widgetRow.icon!="string"?(t(),i(B(e.widgetRow.icon),{key:0,class:"w-[22px] h-[22px]"})):l("",!0)]),_:1},8,["icon"])):e.widgetRow.provider?(t(),i(T,{key:2,domain:e.widgetRow.provider,size:24},null,8,["domain"])):l("",!0)]),_:1}),v("div",L,[e.widgetRow.items.length>0?(t(),i(F,{key:0},{default:a(()=>[(t(!0),u(M,null,P(e.widgetRow.items,n=>(t(),i(h,{key:n.uri},{default:a(()=>[c(E,{item:n,"show-provider-on-cover":e.showProviderOnCover,"permanent-overlay":![s(m).ALBUM,s(m).TRACK,s(m).RADIO].includes(n.media_type),"is-available":s(x)(n),disabled:e.editMode},null,8,["item","show-provider-on-cover","permanent-overlay","is-available","disabled"])]),_:2},1024))),128))]),_:1})):(t(),i(O,{key:1},{default:a(()=>[D(y(b.$t("no_content")),1)]),_:1}))])],2)}}}),J=I(q,[["__scopeId","data-v-fe0b9be0"]]);export{J as W};
