import{d as V,aR as L,D as l,e as i,E as s,g as S,A,O as C,I as o,f as h,H as c,b as u,u as m,a1 as n,ad as g,$ as d}from"./lucide-C2DU1LFb.js";import{_ as M}from"./NowPlayingBadge.vue_vue_type_style_index_0_lang-D7lqdhVg.js";import{M as y,s as T,O as Y,L as O,T as X,S as $,G as p,_ as z}from"./index-CxiRlsCY.js";import{M as D}from"./MediaItemThumb-C7OhU3lK.js";import{_ as N}from"./ProviderIcon.vue_vue_type_style_index_0_lang-C17dV9_V.js";import{U as E,a as R,L as F,R as j,n as G,W as H,X as r,c as U}from"./vuetify-RelkxOq-.js";const W={class:"thumb-container"},q={style:{position:"absolute",left:"-10px",top:"0px","z-index":"2"}},J={key:1,class:"play-button-overlay"},K={key:0},Q=V({__name:"PanelviewItemCompact",props:{item:{},size:{default:200},isSelected:{type:Boolean,default:!1},showCheckboxes:{type:Boolean,default:!1},permanentOverlay:{type:Boolean,default:!1},showProviderOnCover:{type:Boolean,default:!1},isAvailable:{type:Boolean,default:!0},isPlaying:{type:Boolean},parentItem:{default:void 0},disabled:{type:Boolean}},emits:["select"],setup(e,{emit:w}){const a=e,x=w,b=function(t){if(a.showCheckboxes)return;const v="clientX"in t?t.clientX:t.touches[0].clientX,f="clientY"in t?t.clientY:t.touches[0].clientY;$(a.item,v,f,a.parentItem)},B=function(t){if(a.showCheckboxes){x("select",a.item,!a.isSelected);return}X(a.item,t.clientX,t.clientY,a.parentItem)},I=function(t){a.showCheckboxes||p(a.item,t.clientX,t.clientY,a.parentItem)};return(t,v)=>{const f=L("hold");return i(),l(E,null,{default:s(({isHovering:k,props:P})=>[S((i(),l(R,A(P,{class:{"on-hover":k,unavailable:!e.isAvailable},elevation:"0",disabled:e.disabled,onClick:B,onContextmenu:C(b,["right","prevent"])}),{default:s(()=>[e.showCheckboxes?(i(),l(F,{key:0,"model-value":e.showCheckboxes,contained:"",scrim:e.isSelected?t.$vuetify.theme.current.dark?"rgba(0,0,0,.75)":"rgba(255,255,255,.75)":"#ffffff00"},{default:s(()=>[c(j,{class:"panel-item-checkbox",ripple:!1,"model-value":e.isSelected},null,8,["model-value"])]),_:1},8,["model-value","scrim"])):o("",!0),h("div",W,[c(D,{item:e.isAvailable?e.item:void 0},null,8,["item"]),h("div",q,[(e.showProviderOnCover||e.item.media_type===m(y).PLAYLIST)&&"provider_mappings"in e.item?(i(),l(N,{key:0,domain:e.item.media_type==m(y).PLAYLIST?e.item.provider_mappings[0].provider_domain:e.item.provider,size:20},null,8,["domain"])):o("",!0)]),e.isPlaying?(i(),l(M,{key:0,"icon-style":"position: absolute; right: 5px; bottom: 5px","show-badge":!1})):o("",!0),(k||m(T).isTouchscreen)&&e.isAvailable&&e.item.is_playable?(i(),u("div",J,[c(G,{icon:"mdi-play",color:"white",fab:"",style:{opacity:"0.6","font-size":"20px"},onClick:C(I,["stop"])})])):o("",!0)]),c(U,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:s(()=>[c(H,null,{default:s(()=>[e.item.media_type==m(y).FOLDER?(i(),u("span",K,[h("span",null,n(m(Y)(e.item,t.$t)),1)])):(i(),u("span",{key:1,class:g({"is-playing":e.isPlaying})},n(e.item.name),3)),"version"in e.item&&e.item.version?(i(),u("span",{key:2,class:g({"is-playing":e.isPlaying})}," - "+n(e.item.version),3)):o("",!0)]),_:1}),"artists"in e.item&&e.item.artists?(i(),l(r,{key:0,class:"ma-line-clamp-1"},{default:s(()=>[d(n(m(O)(e.item.artists,1)),1)]),_:1})):o("",!0),"authors"in e.item&&e.item.authors?(i(),l(r,{key:1,class:"ma-line-clamp-1"},{default:s(()=>[d(n(e.item.authors.join(" / ")),1)]),_:1})):"publisher"in e.item&&e.item.publisher?(i(),l(r,{key:2,class:"ma-line-clamp-1"},{default:s(()=>[d(n(e.item.publisher),1)]),_:1})):"owner"in e.item&&e.item.owner?(i(),l(r,{key:3,class:"ma-line-clamp-1"},{default:s(()=>[d(n(e.item.owner),1)]),_:1})):"provider_mappings"in e.item?o("",!0):(i(),l(r,{key:4,class:"ma-line-clamp-1"},{default:s(()=>[d(n(t.$t(e.item.media_type)),1)]),_:1}))]),_:1})]),_:2},1040,["class","disabled"])),[[f,b]])]),_:1})}}}),le=z(Q,[["__scopeId","data-v-0acf14bb"]]);export{le as P};
