import{d as B,r as T,z as M,aw as p,a1 as D,a2 as F,c as a,e as i,w as t,f as s,j as o,i as v,u as l,M as N,g as h,t as n,ax as S,G as m,_ as $,ak as A,N as z,D as L,ac as P}from"./index-1fa25223.js";import{M as E,c as H,b as R}from"./helpers-f9fbf435.js";import{a as G,b as O,c as d,V as j,_ as W}from"./VTooltip-c87f5f44.js";import{a as q}from"./VMenu-85495654.js";import{D as J,E as k,o as f}from"./VListItem-53d44b85.js";import{b as K,V as Q}from"./VCard-99bbc2f5.js";import{_ as U}from"./_plugin-vue_export-helper-c27b6911.js";const X={class:"panel-item-details",style:{"padding-top":"10px !important"}},Y={key:0},Z={key:1},x={key:2},ee=["src"],te=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},parentItem:{default:void 0}},emits:["menu","click","select"],setup(g,{emit:V}){const u=g,y=T(!1),b=M(()=>{for(const e of u.item.provider_mappings)if(e.audio_format&&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""}),c=V,w=function(e){u.showCheckboxes||c("menu",e,u.item)},C=function(e){u.showCheckboxes||c("click",e,u.item)};return(e,r)=>{const I=D("hold");return F((a(),i(Q,{class:"panel-item",disabled:!l(R)(e.item),onClick:C,onContextmenu:P(w,["right","prevent"]),onMouseover:r[1]||(r[1]=_=>y.value=!0),onMouseleave:r[2]||(r[2]=_=>y.value=!0)},{default:t(()=>[e.showCheckboxes?(a(),i(q,{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:r[0]||(r[0]=_=>{c("select",e.item,!e.isSelected)})},{default:t(()=>[s(G,{class:"panel-item-checkbox",ripple:!1,"model-value":e.isSelected},null,8,["model-value"])]),_:1},8,["model-value","scrim"])):o("",!0),s(E,{item:e.item,width:"100%"},null,8,["item"]),v("div",X,[s(J,{class:"line-clamp-1 panel-item-details"},{default:t(()=>[e.item.media_type==l(N).FOLDER?(a(),h("span",Y,[v("span",null,n(l(S)(e.item,e.$t)),1)])):(a(),h("span",Z,n(e.item.name),1)),"version"in e.item&&e.item.version?(a(),h("span",x," - "+n(e.item.version),1)):o("",!0)]),_:1}),"artists"in e.item&&e.item.artists?(a(),i(k,{key:0,class:"line-clamp-1 panel-item-details"},{default:t(()=>[m(n(l($)(e.item.artists,1)),1)]),_:1})):"owner"in e.item&&e.item.owner?(a(),i(k,{key:1,class:"line-clamp-1 panel-item-details"},{default:t(()=>[m(n(e.item.owner),1)]),_:1})):e.showMediaType?(a(),i(k,{key:2,class:"line-clamp-1 panel-item-details"},{default:t(()=>[m(n(e.$t(e.item.media_type)),1)]),_:1})):o("",!0)]),s(K,null,{default:t(()=>[e.item.media_type==="track"&&"metadata"in e.item||e.showFavorite?(a(),i(O,{key:0,style:{"min-height":"33px","margin-top":"10px","margin-left":"-15px"}},{default:t(()=>[l(A)(e.item.metadata.explicit||!1)?(a(),i(d,{key:0},{default:t(()=>[s(f,{size:"30",icon:"mdi-alpha-e-box"})]),_:1})):o("",!0),b.value?(a(),i(d,{key:1},{default:t(()=>[s(f,{class:z(e.$vuetify.theme.current.dark?"hiresicon":"hiresiconinverted")},{default:t(()=>[v("img",{src:l(H),width:"30"},null,8,ee),s(j,{activator:"parent",location:"bottom"},{default:t(()=>[m(n(b.value),1)]),_:1})]),_:1},8,["class"])]),_:1})):o("",!0),"disc_number"in e.item&&e.item.disc_number&&e.showTrackNumber?(a(),i(d,{key:2},{default:t(()=>[s(f,{icon:"md:album",style:{"margin-left":"5px"}}),m(" "+n(e.item.disc_number),1)]),_:1})):o("",!0),"track_number"in e.item&&e.item.track_number&&e.showTrackNumber?(a(),i(d,{key:3},{default:t(()=>[s(f,{icon:"mdi-music-circle-outline",style:{"margin-left":"10px"}}),m(" "+n(e.item.track_number),1)]),_:1})):o("",!0),l(L)("bp3")&&e.showFavorite?(a(),i(d,{key:4},{default:t(()=>[s(W,{item:e.item},null,8,["item"])]),_:1})):o("",!0)]),_:1})):o("",!0)]),_:1})]),_:1},8,["disabled"])),[[I,w]])}}});const me=U(te,[["__scopeId","data-v-61618f36"]]);export{me as P};
