import{g as p,p as I,j as M,Z as D,a2 as S,a7 as Y,bq as T,ai as l,a9 as t,ae as s,bt as A,as as L,Y as O,aP as w,aa as o,E as C,o as c,b9 as X,a8 as y,av as z,ac as m,aq as x,a6 as H,ah as N,am as $,an as n,c2 as j,r as P,bv as d,aT as r,b1 as E,aj as F,c4 as q,c3 as J,bJ as R,_ as Z}from"./index-CFcIX8RO.js";import{V as G,_ as K}from"./NowPlayingBadge.vue_vue_type_style_index_0_lang-CGTv89Z9.js";import{M as Q}from"./MediaItemThumb-oOnMmU-2.js";const U=I({disabled:Boolean,modelValue:{type:Boolean,default:null},...S()},"VHover"),W=p()({name:"VHover",props:U(),emits:{"update:modelValue":e=>!0},setup(e,h){let{slots:i}=h;const u=M(e,"modelValue"),{runOpenDelay:f,runCloseDelay:v}=D(e,b=>!e.disabled&&(u.value=b));return()=>i.default?.({isHovering:u.value,props:{onMouseenter:f,onMouseleave:v}})}}),_={class:"thumb-container"},ee={style:{position:"absolute",left:"-10px",top:"0px","z-index":"2"}},ae={key:1,class:"play-button-overlay"},te={key:0},ie=Y({__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:h}){const i=e,u=h,f=function(a){if(i.showCheckboxes)return;const g="clientX"in a?a.clientX:a.touches[0].clientX,k="clientY"in a?a.clientY:a.touches[0].clientY;J(i.item,g,k,i.parentItem)},v=function(a){if(i.showCheckboxes){u("select",i.item,!i.isSelected);return}q(i.item,a.clientX,a.clientY,i.parentItem)},b=function(a){i.showCheckboxes||R(i.item,a.clientX,a.clientY,i.parentItem)};return(a,g)=>{const k=T("hold");return t(),l(W,null,{default:s(({isHovering:V,props:B})=>[A((t(),l(L,O(B,{class:{"on-hover":V,unavailable:!e.isAvailable},elevation:"0",disabled:e.disabled,onClick:v,onContextmenu:w(f,["right","prevent"])}),{default:s(()=>[e.showCheckboxes?(t(),l(X,{key:0,"model-value":e.showCheckboxes,contained:"",scrim:e.isSelected?a.$vuetify.theme.current.dark?"rgba(0,0,0,.75)":"rgba(255,255,255,.75)":"#ffffff00"},{default:s(()=>[c(G,{class:"panel-item-checkbox",ripple:!1,"model-value":e.isSelected},null,8,["model-value"])]),_:1},8,["model-value","scrim"])):o("",!0),C("div",_,[c(Q,{item:e.isAvailable?e.item:void 0},null,8,["item"]),C("div",ee,[e.showProviderOnCover&&"provider_mappings"in e.item?(t(),l(z,{key:0,domain:e.item.media_type==m(x).PLAYLIST?e.item.provider_mappings[0].provider_domain:e.item.provider,size:20},null,8,["domain"])):o("",!0)]),e.isPlaying?(t(),l(K,{key:0,"icon-style":"position: absolute; right: 5px; bottom: 5px","show-badge":!1})):o("",!0),(V||m(H).isTouchscreen)&&e.isAvailable&&e.item.is_playable?(t(),y("div",ae,[c(N,{icon:"mdi-play",color:"white",fab:"",style:{opacity:"0.6","font-size":"20px"},onClick:w(b,["stop"])})])):o("",!0)]),c(F,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:s(()=>[c($,null,{default:s(()=>[e.item.media_type==m(x).FOLDER?(t(),y("span",te,[C("span",null,n(m(j)(e.item,a.$t)),1)])):(t(),y("span",{key:1,class:P({"is-playing":e.isPlaying})},n(e.item.name),3)),"version"in e.item&&e.item.version?(t(),y("span",{key:2,class:P({"is-playing":e.isPlaying})}," - "+n(e.item.version),3)):o("",!0)]),_:1}),"artists"in e.item&&e.item.artists?(t(),l(d,{key:0,class:"line-clamp-1"},{default:s(()=>[r(n(m(E)(e.item.artists,1)),1)]),_:1})):o("",!0),"authors"in e.item&&e.item.authors?(t(),l(d,{key:1,class:"line-clamp-1"},{default:s(()=>[r(n(e.item.authors.join(" / ")),1)]),_:1})):"publisher"in e.item&&e.item.publisher?(t(),l(d,{key:2,class:"line-clamp-1"},{default:s(()=>[r(n(e.item.publisher),1)]),_:1})):"owner"in e.item&&e.item.owner?(t(),l(d,{key:3,class:"line-clamp-1"},{default:s(()=>[r(n(e.item.owner),1)]),_:1})):"provider_mappings"in e.item?o("",!0):(t(),l(d,{key:4,class:"line-clamp-1"},{default:s(()=>[r(n(a.$t(e.item.media_type)),1)]),_:1}))]),_:1})]),_:2},1040,["class","disabled"])),[[k,f]])]),_:1})}}}),oe=Z(ie,[["__scopeId","data-v-eba3a2ae"]]);export{oe as P,W as V};
