import{B as e,H as t,I as n,Q as r,T as i,V as a,W as o,X as s,Z as c,st as l,y as u,z as d}from"./vue-quasar-CzR5lecU.js";import{r as f}from"./index-C94eCAzg.js";var p={name:`ReleaseRadarView`,props:{app:{type:Object,required:!0}},setup(e){return e.app}},m={class:`release-radar-view`},h={class:`release-radar-toolbar`},g={class:`release-radar-summary`,"aria-label":`Release Radar summary`},_=[`disabled`],v={key:0,class:`release-radar-followed`,"aria-label":`Subscribed artists`},y={key:1,class:`release-artist-token__image release-artist-token__image--empty`},b={key:1,class:`message-line message-line--error`},x={key:2,class:`empty-state release-radar-empty`},S={class:`section-header`},C={class:`release-radar-list`},w=[`onClick`],T={key:1,class:`release-radar-cover release-radar-cover--empty`},E={class:`release-radar-copy`},D={class:`explicit-title`},O={class:`explicit-title__text`},k={class:`release-radar-date`},A={class:`release-radar-meta`},j={class:`release-radar-actions`},M=[`disabled`,`onClick`],N=[`disabled`,`onClick`],P=[`disabled`,`onClick`],F=[`onClick`],I={key:0,class:`empty-state release-radar-empty`},L={key:1,class:`empty-state release-radar-empty`};function R(f,p,R,z,B,V){let H=r(`ExplicitBadge`);return s(),t(`section`,m,[d(`div`,h,[d(`div`,g,[d(`div`,null,[p[1]||=d(`span`,null,`Subscriptions`,-1),d(`strong`,null,l(f.releaseRadarSummary.subscribed),1)]),d(`div`,null,[p[2]||=d(`span`,null,`Out today`,-1),d(`strong`,null,l(f.releaseRadarSummary.outToday),1)]),d(`div`,null,[p[3]||=d(`span`,null,`Upcoming`,-1),d(`strong`,null,l(f.releaseRadarSummary.upcoming),1)])]),d(`button`,{type:`button`,class:`release-radar-refresh`,disabled:f.releaseRadarLoading,onClick:p[0]||=e=>f.loadReleaseRadar({force:!0})},[o(i,{name:`refresh`}),d(`span`,null,l(f.releaseRadarLoading?`Refreshing`:`Refresh`),1)],8,_)]),p[4]||=d(`p`,{class:`release-radar-info`},` New and upcoming releases from Official Artist Channels you subscribe to on YouTube. `,-1),f.releaseRadarArtists.length?(s(),t(`section`,v,[(s(!0),t(n,null,c(f.releaseRadarArtists,n=>(s(),t(`div`,{key:`release-artist-${n.browseId||n.name}`,class:`release-artist-token`},[n.thumbnail?(s(),e(u,{key:0,src:n.thumbnail,class:`release-artist-token__image`},null,8,[`src`])):(s(),t(`span`,y,[o(i,{name:`person`})])),d(`span`,null,l(n.name),1)]))),128))])):a(``,!0),f.releaseRadarError?(s(),t(`div`,b,[o(i,{name:`warning`}),d(`span`,null,l(f.releaseRadarError),1)])):a(``,!0),f.releaseRadarLoading&&!f.releaseRadarReleases.length&&!f.releaseRadarArtists.length?(s(),t(`div`,x,` Checking subscription releases… `)):f.releaseRadarSections.length?(s(!0),t(n,{key:3},c(f.releaseRadarSections,r=>(s(),t(`section`,{key:`release-radar-section-${r.key}`,class:`release-radar-section`},[d(`div`,S,[d(`h2`,null,l(r.title),1),d(`span`,null,l(r.items.length)+` `+l(r.items.length===1?`release`:`releases`),1)]),d(`div`,C,[(s(!0),t(n,null,c(r.items,n=>(s(),t(`article`,{key:`release-radar-${n.futureAlbumId||n.browseId||n.title}`,class:`release-radar-row`},[d(`button`,{type:`button`,class:`release-radar-row__main`,onClick:e=>f.openReleaseAlbum(n)},[n.thumbnail?(s(),e(u,{key:0,src:n.thumbnail,class:`release-radar-cover`},null,8,[`src`])):(s(),t(`span`,T,[o(i,{name:`album`})])),d(`span`,E,[d(`strong`,D,[d(`span`,O,l(n.title),1),o(H,{explicit:n.explicit},null,8,[`explicit`])]),d(`span`,null,l(n.artist),1)])],8,w),d(`span`,k,[d(`strong`,null,l(n.releaseTimingLabel),1),d(`span`,null,l(n.releaseDateText||n.year),1)]),d(`span`,A,[d(`strong`,null,l(n.itemCount||`Album`),1),d(`span`,null,l(n.releaseResolved?`YouTube Music`:`iTunes preview`),1)]),d(`div`,j,[d(`button`,{type:`button`,title:`Play album`,disabled:!f.releaseCanPlay(n),onClick:e=>f.playReleaseAlbum(n)},[o(i,{name:`play_arrow`})],8,M),d(`button`,{type:`button`,title:`Add album to queue`,disabled:!f.releaseCanPlay(n),onClick:e=>f.addReleaseAlbumToQueue(n)},[o(i,{name:`queue_music`})],8,N),d(`button`,{type:`button`,title:`Pin lead track`,disabled:!f.releaseCanPlay(n),onClick:e=>f.pinReleaseAlbumLeadTrack(n)},[o(i,{name:`push_pin`})],8,P),d(`button`,{type:`button`,title:`Open album`,onClick:e=>f.openReleaseAlbum(n)},[o(i,{name:`open_in_new`})],8,F)])]))),128))])]))),128)):!f.releaseRadarLoading&&!f.releaseRadarError?(s(),t(n,{key:4},[f.releaseRadarArtists.length?(s(),t(`div`,L,` No new or upcoming releases found for your subscribed artists. `)):(s(),t(`div`,I,` No Official Artist Channel subscriptions found. Subscribe to artists on YouTube to track their new and upcoming releases. `))],64)):a(``,!0)])}var z=f(p,[[`render`,R]]);export{z as default};