import{l as C,r as V,c as g,aA as d,a9 as I,Q as $,q as a,v as s,x as t,j as o,M as l,K as n,N as r,A as f,a7 as S,aj as N,W as T,ai as A}from"./index-e9211ef1.js";import{_ as B,d as D,V as _}from"./MediaItemThumb.vue_vue_type_style_index_0_lang-278977b5.js";import{L}from"./Container-349a0ac0.js";import{c as F}from"./VMenu-bc0cce60.js";import{V as M,b as z,c as p}from"./ListviewItem-b7a4258b.js";import{c as H,d as b,b as j}from"./VListItem-230d1393.js";import{V as c}from"./VBtn-68784d55.js";import{a as P}from"./VCard-138864fc.js";const J=C({__name:"PanelviewItem",props:{item:{},size:{default:200},isSelected:{type:Boolean},showCheckboxes:{type:Boolean,default:!1},showTrackNumber:{type:Boolean,default:!0}},emits:["menu","click","select"],setup(h,{emit:m}){const y=h,v=V(!1),k=g(()=>{for(const e of y.item.provider_mappings)if(e.audio_format.content_type!=null&&[d.DSF,d.FLAC,d.AIFF,d.WAV].includes(e.audio_format.content_type)&&(e.audio_format.sample_rate>48e3||e.audio_format.bit_depth>16))return`${e.audio_format.sample_rate/1e3}kHz ${e.audio_format.bit_depth} bits`;return""});return(e,i)=>{const w=I("hold");return $((a(),s(P,{class:"panel-item",onClick:i[1]||(i[1]=u=>e.showCheckboxes?null:m("click",e.item)),onContextmenu:i[2]||(i[2]=A(u=>e.showCheckboxes?null:m("menu",e.item),["right","prevent"])),onMouseover:i[3]||(i[3]=u=>v.value=!0),onMouseleave:i[4]||(i[4]=u=>v.value=!0)},{default:t(()=>[e.showCheckboxes?(a(),s(F,{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",onClick:i[0]||(i[0]=u=>{m("select",e.item,!e.isSelected)})},{default:t(()=>[o(M,{class:"panel-item-checkbox",ripple:!1,"model-value":e.isSelected},null,8,["model-value"])]),_:1},8,["model-value","scrim"])):l("",!0),o(B,{item:e.item,width:"100%"},null,8,["item"]),o(L,{class:"panel-item-details",style:{"padding-top":"10px !important"}},{default:t(()=>[o(H,{class:"line-clamp-1 panel-item-details"},{default:t(()=>[n(r(e.item.name)+" "+r("version"in e.item&&e.item.version?`- ${e.item.version}`:""),1)]),_:1}),"artists"in e.item&&e.item.artists?(a(),s(b,{key:0,class:"line-clamp-1 panel-item-details"},{default:t(()=>[n(r(f(S)(e.item.artists,1)),1)]),_:1})):"owner"in e.item&&e.item.owner?(a(),s(b,{key:1,class:"line-clamp-1 panel-item-details"},{default:t(()=>[n(r(e.item.owner),1)]),_:1})):l("",!0),e.item&&e.item.media_type==="track"?(a(),s(z,{key:2,style:{"min-height":"22px","padding-top":"5px"}},{default:t(()=>[o(p,null,{default:t(()=>[f(N)(e.item.metadata.explicit||!1)?(a(),s(c,{key:0,icon:"mdi-alpha-e-box"})):l("",!0)]),_:1}),o(p,null,{default:t(()=>[k.value?(a(),s(j,{key:0,src:f(D),width:"30",class:T(e.$vuetify.theme.current.dark?"hiresicondark":"hiresicon")},{default:t(()=>[o(_,{activator:"parent",location:"bottom"},{default:t(()=>[n(r(k.value),1)]),_:1})]),_:1},8,["src","class"])):l("",!0)]),_:1}),"disc_number"in e.item&&e.item.disc_number&&e.showTrackNumber?(a(),s(p,{key:0},{default:t(()=>[o(c,{style:{"margin-left":"5px"},icon:"md:album"}),n(" "+r(e.item.disc_number),1)]),_:1})):l("",!0),"track_number"in e.item&&e.item.track_number&&e.showTrackNumber?(a(),s(p,{key:1},{default:t(()=>[o(c,{style:{"margin-left":"5px"},icon:"mdi-music-circle-outline"}),n(" "+r(e.item.track_number),1)]),_:1})):l("",!0)]),_:1})):l("",!0)]),_:1})]),_:1})),[[w,()=>e.showCheckboxes?null:m("menu",e.item)]])}}});export{J as _};
