import{g as p,p as I,j as M,af as S,ak as D,ay as A,bO as N,aI as l,aA as t,aG as s,N as O,aS as Y,ae as z,bd as V,aB as o,E as C,o as c,bx as L,az as y,aV as T,aD as m,aQ as w,ax as X,M as H,aM as $,aN as n,cl as E,r as B,bS as d,bh as r,bp as F,aJ as j,cn as G,cm as J,c4 as Q,_ as R}from"./index-BRUnowC8.js";import{V as q,_ as K}from"./userPreferences-DBWZCHKf.js";import{M as U}from"./MediaItemThumb-CIE9_Elw.js";const W=I({disabled:Boolean,modelValue:{type:Boolean,default:null},...D()},"VHover"),Z=p()({name:"VHover",props:W(),emits:{"update:modelValue":e=>!0},setup(e,h){let{slots:i}=h;const u=M(e,"modelValue"),{runOpenDelay:f,runCloseDelay:v}=S(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=A({__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}G(i.item,a.clientX,a.clientY,i.parentItem)},b=function(a){i.showCheckboxes||Q(i.item,a.clientX,a.clientY,i.parentItem)};return(a,g)=>{const k=N("hold");return t(),l(Z,null,{default:s(({isHovering:x,props:P})=>[O((t(),l(Y,z(P,{class:{"on-hover":x,unavailable:!e.isAvailable},elevation:"0",disabled:e.disabled,onClick:v,onContextmenu:V(f,["right","prevent"])}),{default:s(()=>[e.showCheckboxes?(t(),l(L,{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(q,{class:"panel-item-checkbox",ripple:!1,"model-value":e.isSelected},null,8,["model-value"])]),_:1},8,["model-value","scrim"])):o("",!0),C("div",_,[c(U,{item:e.isAvailable?e.item:void 0},null,8,["item"]),C("div",ee,[e.showProviderOnCover&&"provider_mappings"in e.item?(t(),l(T,{key:0,domain:e.item.media_type==m(w).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),(x||m(X).isTouchscreen)&&e.isAvailable&&e.item.is_playable?(t(),y("div",ae,[c(H,{icon:"mdi-play",color:"white",fab:"",style:{opacity:"0.6","font-size":"20px"},onClick:V(b,["stop"])})])):o("",!0)]),c(j,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:s(()=>[c($,null,{default:s(()=>[e.item.media_type==m(w).FOLDER?(t(),y("span",te,[C("span",null,n(m(E)(e.item,a.$t)),1)])):(t(),y("span",{key:1,class:B({"is-playing":e.isPlaying})},n(e.item.name),3)),"version"in e.item&&e.item.version?(t(),y("span",{key:2,class:B({"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(F)(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=R(ie,[["__scopeId","data-v-eba3a2ae"]]);export{oe as P,Z as V};
