import{v as C,r as B,c as $,aE as p,ae as I,af as S,y as a,z as s,A as t,l as o,I as n,Z as T,x as m,M as _,E as k,B as F,N as l,aF as N,R as r,ab as D,an as M,_ as L,K as A,H as z}from"./index-20675090.js";import{_ as E,c as H}from"./VBadge-778cac01.js";import{L as R}from"./ListItem-e092a77b.js";import{a as O,b as P,c as f,V as G,_ as K}from"./VTooltip-cf009865.js";import{f as W,g as Z,c}from"./VMenu-ae4158ef.js";import{k as y,s as j}from"./forwardRefs-67412654.js";import{V as q}from"./VCard-30020028.js";const J={key:0},Q={key:1},U={key:2},se=C({__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(b,{emit:w}){const g=b,v=B(!1),h=$(()=>{for(const e of g.item.provider_mappings)if(e.audio_format.content_type!=null&&[p.DSF,p.FLAC,p.AIFF,p.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""}),u=w;return(e,i)=>{const V=I("hold");return S((a(),s(q,{class:"panel-item",onClick:i[1]||(i[1]=d=>e.showCheckboxes?null:u("click",e.item)),onContextmenu:i[2]||(i[2]=z(d=>e.showCheckboxes?null:u("menu",e.item),["right","prevent"])),onMouseover:i[3]||(i[3]=d=>v.value=!0),onMouseleave:i[4]||(i[4]=d=>v.value=!0)},{default:t(()=>[e.showCheckboxes?(a(),s(W,{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]=d=>{u("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"])):n("",!0),o(E,{item:e.item,width:"100%"},null,8,["item"]),o(R,{class:"panel-item-details",style:{"padding-top":"10px !important"}},T({default:t(()=>[o(Z,{class:"line-clamp-1 panel-item-details"},{default:t(()=>[e.item.media_type==m(_).FOLDER?(a(),k("span",J,[F("span",null,l(m(N)(e.item,e.$t)),1)])):(a(),k("span",Q,l(e.item.name),1)),"version"in e.item&&e.item.version?(a(),k("span",U," - "+l(e.item.version),1)):n("",!0)]),_:1}),"artists"in e.item&&e.item.artists?(a(),s(c,{key:0,class:"line-clamp-1 panel-item-details"},{default:t(()=>[r(l(m(D)(e.item.artists,1)),1)]),_:1})):"owner"in e.item&&e.item.owner?(a(),s(c,{key:1,class:"line-clamp-1 panel-item-details"},{default:t(()=>[r(l(e.item.owner),1)]),_:1})):e.showMediaType?(a(),s(c,{key:2,class:"line-clamp-1 panel-item-details"},{default:t(()=>[r(l(e.$t(e.item.media_type)),1)]),_:1})):n("",!0),e.item&&e.item.media_type==="track"&&"metadata"in e.item?(a(),s(P,{key:3,style:{"min-height":"22px","padding-top":"5px"}},{default:t(()=>[o(f,null,{default:t(()=>[m(M)(e.item.metadata.explicit||!1)?(a(),s(y,{key:0,icon:"mdi-alpha-e-box"})):n("",!0)]),_:1}),o(f,null,{default:t(()=>[h.value?(a(),s(j,{key:0,src:m(H),width:"30",class:L(e.$vuetify.theme.current.dark?"hiresicondark":"hiresicon")},{default:t(()=>[o(G,{activator:"parent",location:"bottom"},{default:t(()=>[r(l(h.value),1)]),_:1})]),_:1},8,["src","class"])):n("",!0)]),_:1}),"disc_number"in e.item&&e.item.disc_number&&e.showTrackNumber?(a(),s(f,{key:0},{default:t(()=>[o(y,{style:{"margin-left":"5px"},icon:"md:album"}),r(" "+l(e.item.disc_number),1)]),_:1})):n("",!0),"track_number"in e.item&&e.item.track_number&&e.showTrackNumber?(a(),s(f,{key:1},{default:t(()=>[o(y,{style:{"margin-left":"5px"},icon:"mdi-music-circle-outline"}),r(" "+l(e.item.track_number),1)]),_:1})):n("",!0)]),_:1})):n("",!0)]),_:2},[m(A)("bp3")&&e.showFavorite?{name:"append",fn:t(()=>[o(K,{item:e.item},null,8,["item"])]),key:"0"}:void 0]),1024)]),_:1})),[[V,()=>e.showCheckboxes?null:u("menu",e.item)]])}}});export{se as _};
