"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1021],{14755:(e,t,s)=>{s.d(t,{w:()=>o});var a=s(41194),n=s(13188),r=s(70867);const c=e=>{const[t,{username:s,concertUri:a}]=e.queryKey;return(async(e,t)=>{const s=await(0,r.A0)(n.b.getInstance(),e,t);return s.body?.found[0]})(s,a)},o=e=>{const t=["concertInCollection",e];return(0,a.a)({queryKey:t,queryFn:c,retry:!1,enabled:!!e.username})}},73205:(e,t,s)=>{s.r(t),s.d(t,{ConcertsCarousel:()=>U,default:()=>U});s(86277);var a=s(50959),n=s(69736),r=s(92075),c=s(94260),o=s(85648),i=s(55842),l=s(6370),d=s(60046),u=s(80626),m=s(97607),x=s(11527);const v=e=>{const{artistName:t,artistConcertsUri:s,position:a,spec:r}=e,c=(0,u.$P)(),i=r.concertsCarouselFactory().allEventsCardFactory({position:a,uri:s}),v=(0,u.Wi)(i);return(0,x.jsx)("section",{ref:v,children:(0,x.jsx)("div",{className:m.Z.cards,children:(0,x.jsx)("div",{className:m.Z.allEventsCard,children:(0,x.jsxs)("div",{className:m.Z.cardContent,children:[(0,x.jsx)(n.x,{as:"p",variant:"bodySmall",semanticColor:"textSubdued",className:m.Z.subtitle,children:o.ag.get("concerts_on_tour")}),(0,x.jsx)(n.x,{as:"h1",variant:"bodyMediumBold",className:m.Z.title,semanticColor:"textBase",children:t}),(0,x.jsx)(d.default,{to:s,className:m.Z.cardLink,onClick:()=>{const e=i.hitUiNavigate({destination:s});c.logInteraction(e)},children:(0,x.jsx)(l.P,{as:"span",size:"small",className:m.Z.cardButton,children:o.ag.get("concerts_see_all_events")})})]})})})})},h=e=>e.artistName&&e.artistConcertsUri?(0,x.jsx)(v,{...e}):null;var C=s(35869),g=s(82322),j=s(26520),b=s(14755),y=s(5863),N=s(87350),Z=s(13188),p=s(70867),f=s(19039);const I=e=>{const{concertUri:t,concertTitle:s,venue:r,imageUrl:c,date:i,spec:l,position:v}=e,{enqueueSnackbar:h}=(0,f.D)(),I=(0,C.v9)(N.n5),B=(0,b.w)({username:I,concertUri:t}),U=B?.data||!1,[k,F]=(0,a.useState)(U),_=(0,y.CH)(i),w=t.split(":")[2],S=(0,u.$P)(),E=l.concertsCarouselFactory().concertCardFactory({position:v,uri:t}),P=(0,u.Wi)(E),K=()=>{const e=E.interestedButtonFactory();k?((0,p.FB)(Z.b.getInstance(),w),h(o.ag.get("concerts_removed-from-your-saved-events")),S.logInteraction(e.hitRemoveInterest())):((0,p.l7)(Z.b.getInstance(),w),h(o.ag.get("concerts_added-to-your-saved-events")),S.logInteraction(e.hitAddInterest())),F(!k)};return(0,x.jsx)("section",{ref:P,children:(0,x.jsx)("div",{className:m.Z.cards,children:(0,x.jsxs)("div",{className:m.Z.tourCard,"data-testid":"on-tour-card",children:[c&&(0,x.jsx)("img",{className:m.Z.cardImage,src:c,alt:""}),(0,x.jsx)(d.default,{to:t,className:m.Z.eventCard,onClick:()=>{const e=E.hitUiNavigate({destination:t});S.logInteraction(e)},children:(0,x.jsxs)("div",{className:m.Z.cardContent,children:[(0,x.jsx)(n.x,{as:"p",variant:"bodySmall",semanticColor:"textSubdued",className:m.Z.subtitle,children:[(0,y.xE)(_),(0,y.hK)(_)].join(" • ")}),(0,x.jsx)(n.x,{as:"h1",variant:"bodyMediumBold",className:m.Z.title,semanticColor:"textBase",children:s}),(0,x.jsx)(n.x,{as:"h3",variant:"bodyMediumBold",semanticColor:"textSubdued",className:m.Z.venue,children:r})]})}),(0,x.jsx)("div",{className:m.Z.interestedIcon,onClick:K,onKeyPress:K,role:"button",tabIndex:0,children:k?(0,x.jsx)(g.K,{semanticColor:"textBrightAccent"}):(0,x.jsx)(j.G,{semanticColor:"textBase"})})]})})})},B=e=>e.concertTitle&&e.concertUri?(0,x.jsx)(I,{...e}):null,U=e=>{const{liveEvents:t,artistConcertsUri:s,artistName:l,spec:d}=e,v=(0,a.useRef)(null),C=(0,u.$P)();return(0,x.jsxs)("div",{className:m.Z.concertsCarousel,children:[(0,x.jsx)(n.x,{as:"h1",variant:"bodyMediumBold",semanticColor:"textBase",children:o.ag.get("concerts")}),(0,x.jsxs)("div",{className:m.Z.carouselContent,ref:v,children:[t.map(((e,t)=>(0,x.jsx)("div",{className:m.Z.eventCard,children:(0,x.jsx)(B,{concertUri:e.uri,concertTitle:e.title,venue:e.venue,imageUrl:e.imageUrl,date:e.startDate,position:t+1,spec:d})},t))),(0,x.jsx)("div",{className:m.Z.eventCard,children:(0,x.jsx)(h,{artistConcertsUri:s,artistName:l,spec:d,position:t.length+1})})]}),t.length>0&&(0,x.jsxs)("div",{className:m.Z.concertsCarouselControls,children:[(0,x.jsx)(i.E,{size:"sm",onClick:()=>{v.current?.scrollBy({left:-420,behavior:"smooth"});const e=d.concertsCarouselFactory().previousButtonFactory().hitUiReveal();C.logInteraction(e)},icon:r.e,ariaLabel:o.ag.get("carousel.left"),tabIndex:-1,className:m.Z.carouselControlPrev}),(0,x.jsx)(i.E,{size:"sm",onClick:()=>{v.current?.scrollBy({left:420,behavior:"smooth"});const e=d.concertsCarouselFactory().nextButtonFactory().hitUiReveal();C.logInteraction(e)},icon:c.V,ariaLabel:o.ag.get("carousel.right"),tabIndex:-1,className:m.Z.carouselControlNext})]})]})}}}]); //# sourceMappingURL=this-is-playlist-concerts-carousel.js.map