import{g,p as P,j as D,x as M,aa as S,y as l,z as s,A as t,a9 as I,m as A,a2 as C,J as m,l as f,B as w,D as b,G as y,M as X,K as i,aH as Y,S as u,am as H,W as N,H as O}from"./index-DKhfhZyI.js";import{M as T}from"./ItemContextMenu.vue_vue_type_style_index_0_scoped_cee6bfa4_lang-BEm2OpTr.js";import{a as $,m as z,e as L}from"./VMenu-BTA9m0lg.js";import{V as E}from"./VCard-AQsAsy9j.js";import{V as F}from"./VCheckbox-w4Dp7feX.js";import{D as j,E as p,k as G,v as J}from"./VListItem-DG7fZYqG.js";import{_ as K}from"./_plugin-vue_export-helper-DlAUqK2U.js";const R=P({disabled:Boolean,modelValue:{type:Boolean,default:null},...z()},"VHover"),W=g()({name:"VHover",props:R(),emits:{"update:modelValue":n=>!0},setup(n,h){let{slots:a}=h;const o=D(n,"modelValue"),{runOpenDelay:d,runCloseDelay:v}=$(n,r=>!n.disabled&&(o.value=r));return()=>{var r;return(r=a.default)==null?void 0:r.call(a,{isHovering:o.value,props:{onMouseenter:d,onMouseleave:v}})}}}),q=["model-value"],Q={key:0},U={key:1},Z={key:2},_=M({__name:"PanelviewItemCompact",props:{item:{},size:{default:200},isSelected:{type:Boolean,default:!1},showCheckboxes:{type:Boolean,default:!1},permanentOverlay:{type:Boolean,default:!1},isAvailable:{type:Boolean,default:!0},isPlayable:{type:Boolean,default:!0}},emits:["menu","click","play","select"],setup(n,{emit:h}){const a=n,o=h,d=function(e){if(a.showCheckboxes)return;const V="clientX"in e?e.clientX:e.touches[0].clientX,k="clientY"in e?e.clientY:e.touches[0].clientY;o("menu",a.item,V,k)},v=function(e){if(a.showCheckboxes){o("select",a.item,!a.isSelected);return}o("click",a.item,e.clientX,e.clientY)},r=function(e){a.showCheckboxes||o("play",a.item,e.clientX,e.clientY)};return(e,V)=>{const k=S("hold");return s(),l(W,null,{default:t(({isHovering:c,props:B})=>[I((s(),l(E,A(B,{class:{"on-hover":c,unavailable:!e.isAvailable},elevation:c?3:0,onClick:v,onContextmenu:C(d,["right","prevent"])}),{default:t(()=>[e.showCheckboxes?(s(),l(L,{key:0,"model-value":e.showCheckboxes,contained:"",scrim:e.isSelected?e.$vuetify.theme.current.dark?"rgba(0,0,0,.75)":"rgba(255,255,255,.75)":"#ffffff00"},{default:t(()=>[f(F,{class:"panel-item-checkbox",ripple:!1,"model-value":e.isSelected},null,8,["model-value"])]),_:1},8,["model-value","scrim"])):m("",!0),f(T,{item:e.isAvailable?e.item:void 0},null,8,["item"]),w("div",{class:N(e.$vuetify.theme.current.dark?"paneldetails-dark":"paneldetails"),"model-value":c||e.$vuetify.display.mobile||e.permanentOverlay},[f(G,{variant:"text",slim:"",tile:"",density:"compact",class:"panel-item-details"},{default:t(()=>[f(j,null,{default:t(()=>[e.item.media_type==y(X).FOLDER?(s(),b("span",Q,[w("span",null,i(y(Y)(e.item,e.$t)),1)])):(s(),b("span",U,i(e.item.name),1)),"version"in e.item&&e.item.version?(s(),b("span",Z," - "+i(e.item.version),1)):m("",!0)]),_:1}),"artists"in e.item&&e.item.artists?(s(),l(p,{key:0,class:"line-clamp-1"},{default:t(()=>[u(i(y(H)(e.item.artists,1)),1)]),_:1})):m("",!0),"authors"in e.item&&e.item.authors?(s(),l(p,{key:1,class:"line-clamp-1"},{default:t(()=>[u(i(e.item.authors.join(" / ")),1)]),_:1})):"publisher"in e.item&&e.item.publisher?(s(),l(p,{key:2,class:"line-clamp-1"},{default:t(()=>[u(i(e.item.publisher),1)]),_:1})):"owner"in e.item&&e.item.owner?(s(),l(p,{key:3,class:"line-clamp-1"},{default:t(()=>[u(i(e.item.owner),1)]),_:1})):"provider_mappings"in e.item?m("",!0):(s(),l(p,{key:4,class:"line-clamp-1"},{default:t(()=>[u(i(e.$t(e.item.media_type)),1)]),_:1}))]),_:1})],10,q),(c||y(O).isTouchscreen)&&e.isAvailable&&e.isPlayable?(s(),l(J,{key:1,icon:"mdi-play",color:"primary",fab:"",size:"small",style:{position:"absolute",right:"10px",bottom:"35px",opacity:"0.8"},onClick:C(r,["stop"])})):m("",!0)]),_:2},1040,["class","elevation"])),[[k,d]])]),_:1})}}}),oe=K(_,[["__scopeId","data-v-d584fc1c"]]);export{oe as P,W as V};
