import{d as N,aV as T,D as l,e as i,E as s,g as A,A as L,O as C,I as o,f as h,H as c,b as u,u as m,a1 as n,ad as g,c as M,$ as d}from"./lucide-BsOfcLnq.js";import{_ as Y}from"./NowPlayingBadge.vue_vue_type_style_index_0_lang-cya6xPO3.js";import{M as f,s as D,N as O,K as X,U as $,T as z,S as E,h as F,_ as G}from"./index-CyXUjyDM.js";import{M as R}from"./MediaItemThumb-BvqlnbT6.js";import{_ as U}from"./ProviderIcon.vue_vue_type_style_index_0_lang-CsLTxntn.js";import{S as j,a as H,Z as K,P as Z,m as q,T as J,U as r,c as Q}from"./vuetify-DHCm6MV9.js";import{u as W}from"./vue-i18n-CXdnqGsF.js";const _={class:"thumb-container"},ee={style:{position:"absolute",left:"-10px",top:"0px","z-index":"2"}},te={key:1,class:"play-button-overlay"},ae={key:0},ie=N({__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},disablePlayButton:{type:Boolean,default:!1},parentItem:{default:void 0},disabled:{type:Boolean}},emits:["select"],setup(e,{emit:w}){const a=e,{t:x,te:B}=W(),P=M(()=>a.item.media_type===f.GENRE?F(a.item.name,a.item.translation_key,x,B):a.item.name),I=w,b=function(t){if(a.showCheckboxes)return;const v="clientX"in t?t.clientX:t.touches[0].clientX,y="clientY"in t?t.clientY:t.touches[0].clientY;z(a.item,v,y,a.parentItem)},V=function(t){if(a.showCheckboxes){I("select",a.item,!a.isSelected);return}$(a.item,t.clientX,t.clientY,a.parentItem)},p=function(t){a.showCheckboxes||E(a.item,t.clientX,t.clientY,a.parentItem)};return(t,v)=>{const y=T("hold");return i(),l(j,null,{default:s(({isHovering:k,props:S})=>[A((i(),l(H,L(S,{class:{"on-hover":k,unavailable:!e.isAvailable},elevation:"0",disabled:e.disabled,onClick:V,onContextmenu:C(b,["right","prevent"])}),{default:s(()=>[e.showCheckboxes?(i(),l(K,{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(Z,{class:"panel-item-checkbox",ripple:!1,"model-value":e.isSelected},null,8,["model-value"])]),_:1},8,["model-value","scrim"])):o("",!0),h("div",_,[c(R,{item:e.isAvailable?e.item:void 0},null,8,["item"]),h("div",ee,[(e.showProviderOnCover||e.item.media_type===m(f).PLAYLIST)&&"provider_mappings"in e.item?(i(),l(U,{key:0,domain:e.item.media_type==m(f).PLAYLIST?e.item.provider_mappings[0].provider_domain:e.item.provider,size:20},null,8,["domain"])):o("",!0)]),e.isPlaying?(i(),l(Y,{key:0,"icon-style":"position: absolute; right: 5px; bottom: 5px","show-badge":!1})):o("",!0),(k||m(D).isTouchscreen)&&e.isAvailable&&e.item.is_playable?(i(),u("div",te,[c(q,{icon:"mdi-play",color:"white",fab:"",disabled:e.disablePlayButton,style:{opacity:"0.6","font-size":"20px"},onClick:C(p,["stop"])},null,8,["disabled"])])):o("",!0)]),c(Q,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:s(()=>[c(J,null,{default:s(()=>[e.item.media_type==m(f).FOLDER?(i(),u("span",ae,[h("span",null,n(m(O)(e.item,t.$t)),1)])):(i(),u("span",{key:1,class:g({"is-playing":e.isPlaying})},n(P.value),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(X)(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"])),[[y,b]])]),_:1})}}}),re=G(ie,[["__scopeId","data-v-96d571a0"]]);export{re as P};
