import{v as B,r as I,c as T,aH as f,ae as $,af as F,y as a,z as i,A as t,l as o,I as l,x as m,M,E as v,B as b,N as n,aI as N,Q as r,ab as S,aq as _,Z as D,K as A,aJ as L,H as z}from"./index-5804982a.js";import{M as H,b as E}from"./VBadge-3d00ada8.js";import{L as R}from"./Container-d5ee1f41.js";import{a as O,b as P,c as u,V as q,_ as G}from"./VTooltip-5622a67d.js";import{f as J,g as K,c as y}from"./VMenu-18f2572a.js";import{n as k}from"./forwardRefs-03519353.js";import{V as Q}from"./VCard-cc8044ef.js";const W={key:0},Z={key:1},j={key:2},U=["src"],se=B({__name:"PanelviewItem",props:{item:{},size:{default:200},isSelected:{type:Boolean},showCheckboxes:{type:Boolean,default:!1},showTrackNumber:{type:Boolean,default:!0},showMediaType:{type:Boolean,default:!1},showFavorite:{type:Boolean,default:!1}},emits:["menu","click","select"],setup(w,{emit:g}){const C=w,c=I(!1),h=T(()=>{for(const e of C.item.provider_mappings)if(e.audio_format&&e.audio_format.content_type!=null&&[f.DSF,f.FLAC,f.AIFF,f.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""}),d=g;return(e,s)=>{const V=$("hold");return F((a(),i(Q,{class:"panel-item",disabled:!m(L)(e.item),onClick:s[1]||(s[1]=p=>e.showCheckboxes?null:d("click",e.item)),onContextmenu:s[2]||(s[2]=z(p=>e.showCheckboxes?null:d("menu",e.item),["right","prevent"])),onMouseover:s[3]||(s[3]=p=>c.value=!0),onMouseleave:s[4]||(s[4]=p=>c.value=!0)},{default:t(()=>[e.showCheckboxes?(a(),i(J,{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:s[0]||(s[0]=p=>{d("select",e.item,!e.isSelected)})},{default:t(()=>[o(O,{class:"panel-item-checkbox",ripple:!1,"model-value":e.isSelected},null,8,["model-value"])]),_:1},8,["model-value","scrim"])):l("",!0),o(H,{item:e.item,width:"100%"},null,8,["item"]),o(R,{class:"panel-item-details",style:{"padding-top":"10px !important"}},{default:t(()=>[o(K,{class:"line-clamp-1 panel-item-details"},{default:t(()=>[e.item.media_type==m(M).FOLDER?(a(),v("span",W,[b("span",null,n(m(N)(e.item,e.$t)),1)])):(a(),v("span",Z,n(e.item.name),1)),"version"in e.item&&e.item.version?(a(),v("span",j," - "+n(e.item.version),1)):l("",!0)]),_:1}),"artists"in e.item&&e.item.artists?(a(),i(y,{key:0,class:"line-clamp-1 panel-item-details"},{default:t(()=>[r(n(m(S)(e.item.artists,1)),1)]),_:1})):"owner"in e.item&&e.item.owner?(a(),i(y,{key:1,class:"line-clamp-1 panel-item-details"},{default:t(()=>[r(n(e.item.owner),1)]),_:1})):e.showMediaType?(a(),i(y,{key:2,class:"line-clamp-1 panel-item-details"},{default:t(()=>[r(n(e.$t(e.item.media_type)),1)]),_:1})):l("",!0),e.item.media_type==="track"&&"metadata"in e.item||e.showFavorite?(a(),i(P,{key:3,style:{"min-height":"33px","margin-top":"10px","margin-left":"-15px"}},{default:t(()=>[m(_)(e.item.metadata.explicit||!1)?(a(),i(u,{key:0},{default:t(()=>[o(k,{size:"30",icon:"mdi-alpha-e-box"})]),_:1})):l("",!0),h.value?(a(),i(u,{key:1},{default:t(()=>[o(k,{class:D(e.$vuetify.theme.current.dark?"hiresicon":"hiresiconinverted")},{default:t(()=>[b("img",{src:m(E),width:"30"},null,8,U),o(q,{activator:"parent",location:"bottom"},{default:t(()=>[r(n(h.value),1)]),_:1})]),_:1},8,["class"])]),_:1})):l("",!0),"disc_number"in e.item&&e.item.disc_number&&e.showTrackNumber?(a(),i(u,{key:2},{default:t(()=>[o(k,{icon:"md:album",style:{"margin-left":"5px"}}),r(" "+n(e.item.disc_number),1)]),_:1})):l("",!0),"track_number"in e.item&&e.item.track_number&&e.showTrackNumber?(a(),i(u,{key:3},{default:t(()=>[o(k,{icon:"mdi-music-circle-outline",style:{"margin-left":"10px"}}),r(" "+n(e.item.track_number),1)]),_:1})):l("",!0),m(A)("bp3")&&e.showFavorite?(a(),i(u,{key:4},{default:t(()=>[o(G,{item:e.item},null,8,["item"])]),_:1})):l("",!0)]),_:1})):l("",!0)]),_:1})]),_:1},8,["disabled"])),[[V,()=>e.showCheckboxes?null:d("menu",e.item)]])}}});export{se as _};
