import{B as e,H as t,I as n,Q as r,T as i,W as a,X as o,Z as s,st as c,y as l,z as u}from"./vue-quasar-CzR5lecU.js";import{r as d}from"./index-C94eCAzg.js";var f={name:`RecentlyPlayedView`,props:{app:{type:Object,required:!0}},setup(e){return e.app}},p={class:`shelf-section recently-played-view`},m={class:`section-header`},h={key:0,class:`table-card`},g=[`onClick`,`onKeydown`,`onContextmenu`],_={class:`table-index`},v={class:`table-track`},y={key:1,class:`table-cover table-cover--empty`},b={class:`table-copy`},x={class:`explicit-title`},S={class:`explicit-title__text`},C={class:`table-album`},w={class:`table-time`},T={key:1,class:`empty-state`};function E(d,f,E,D,O,k){let A=r(`ExplicitBadge`);return o(),t(`section`,p,[u(`div`,m,[f[0]||=u(`h2`,null,`Listening history`,-1),u(`span`,null,c(d.history.length)+` tracks`,1)]),d.history.length?(o(),t(`div`,h,[(o(!0),t(n,null,s(d.history,(n,r)=>(o(),t(`button`,{key:`recently-played-${n.id}-${r}`,type:`button`,class:`table-row recently-played-view__row`,onClick:e=>d.playHistoryTrack(n),onKeydown:e=>d.onSongActionKeydown(e,n),onContextmenu:e=>d.openSongActionMenu(n,e)},[u(`span`,_,c(r+1),1),u(`span`,v,[n.thumbnail?(o(),e(l,{key:0,src:n.thumbnail,class:`table-cover`},null,8,[`src`])):(o(),t(`span`,y,[a(i,{name:`music_note`})])),u(`span`,b,[u(`strong`,x,[u(`span`,S,c(n.title),1),a(A,{explicit:n.explicit},null,8,[`explicit`])]),u(`small`,null,c(d.itemMeta(n)),1)])]),u(`span`,C,c(n.album||`—`),1),u(`span`,w,c(n.duration||`—`),1)],40,g))),128))])):(o(),t(`div`,T,`Nothing has been played yet.`))])}var D=d(f,[[`render`,E]]);export{D as default};