import{l as C,r as g,c as V,aD as d,af as I,R as $,v as a,x as s,y as t,j as o,D as l,N as n,J as r,q as f,ab as S,ar as D,X as N,z as T}from"./index-8ef8125d.js";import{_ as B,d as _}from"./MediaItemThumb.vue_vue_type_style_index_0_lang-3622812c.js";import{L}from"./ListItem-bba986fb.js";import{e as z}from"./VMenu-a805d6b6.js";import{a as A,b as F,c as p,V as H}from"./ListviewItem-ade956db.js";import{c as M,a as b}from"./VListItem-b049d12d.js";import{j as c,l as R}from"./VBtn-49774b84.js";import{a as j}from"./VCard-e81591ba.js";const K=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=g(!1),k=V(()=>{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(j,{class:"panel-item",onClick:i[1]||(i[1]=u=>e.showCheckboxes?null:m("click",e.item)),onContextmenu:i[2]||(i[2]=T(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(z,{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(A,{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(M,{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(F,{key:2,style:{"min-height":"22px","padding-top":"5px"}},{default:t(()=>[o(p,null,{default:t(()=>[f(D)(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(R,{key:0,src:f(_),width:"30",class:N(e.$vuetify.theme.current.dark?"hiresicondark":"hiresicon")},{default:t(()=>[o(H,{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{K as _};
