Loading
function(e,t,i){i.d(t,{A:()=>L});var l=i(627968),n=i(64700),s=i(17928),a=i(661531),r=i(834730),c=i(97808),o=i(778712),d=i(983851),u=i(364522),m=i(858177),A=i(47167),h=i(475889),p=i(291594),g=i(85451),x=i(137177),I=i(409626),v=i(692969),f=i(529433),N=i(975732),y=i(820512),S=i(769022),j=i(898926),E=i(287809),C=i(174459),_=i(562153),T=i(652215),b=i(375708),O=i(672680);function P(e){let{event:t,guildId:i,channelId:n}=e,a=(0,s.bG)([E.default],()=>E.default.getUser(t.userId)),c=(0,m.O)(t.applicationId??null),o=_.Ay.useName(i,n,a),d=(0,v.A)({location:"VoiceChannelHistory",applicationId:t.applicationId??void 0,source:I.Ob.ActivityCard});return null==a?null:(0,l.jsxs)("li",{className:O.NG,children:[(0,l.jsx)("div",{className:O.Wz}),(0,l.jsx)("div",{className:O.xW,children:(0,l.jsx)(x.A,{game:c,className:O.AW,"aria-hidden":!0})}),(0,l.jsxs)("div",{className:O.Kw,children:[(0,l.jsx)(r.E,{variant:"text-sm/normal",className:O.rN,children:b.intl.format(b.t.CKIMrx,{user:(0,l.jsx)(p.A,{tag:"span",onClick:()=>(0,N.openUserProfileModal)({userId:t.userId,guildId:i,channelId:n}),children:(0,l.jsx)(r.E,{variant:"text-sm/semibold",tag:"span",children:o})}),activityName:null!=d&&null!=c?(0,l.jsx)(p.A,{tag:"span",onClick:d,children:(0,l.jsx)(r.E,{variant:"text-sm/semibold",tag:"span",children:c.name})}):(0,l.jsx)(r.E,{variant:"text-sm/semibold",tag:"span",children:c?.name??b.intl.string(b.t.GIWFlF)})})}),(0,l.jsx)(r.E,{variant:"text-xs/normal",color:"text-muted",className:O.gE,children:(0,l.jsx)(f.Ay,{end:t.timestamp,location:f.Ay.Locations.VOICE_CHANNEL_HISTORY})})]})]})}function G(e){let{event:t,guildId:i,channelId:n}=e,a=(0,s.bG)([E.default],()=>E.default.getUser(t.userId)),d=_.Ay.useName(i,n,a);return null==a?null:(0,l.jsxs)("li",{className:O.NG,children:[(0,l.jsx)("div",{className:O.Wz}),(0,l.jsx)("div",{className:O.xW,children:(0,l.jsx)(c.eu,{src:a.getAvatarURL(i,20),size:o._3.SIZE_20,"aria-hidden":!0})}),(0,l.jsxs)("div",{className:O.Kw,children:[(0,l.jsx)(r.E,{variant:"text-sm/normal",className:O.qJ,children:b.intl.format(b.t.TlVwqn,{user:d,userHook:(e,s)=>(0,l.jsx)(p.A,{tag:"span",className:O.C3,onClick:()=>(0,N.openUserProfileModal)({userId:t.userId,guildId:i,channelId:n}),children:(0,l.jsx)(r.E,{variant:"text-sm/semibold",tag:"span",children:e})},s)})}),(0,l.jsx)(r.E,{variant:"text-xs/normal",color:"text-muted",className:O.gE,children:(0,l.jsx)(f.Ay,{end:t.timestamp,location:f.Ay.Locations.VOICE_CHANNEL_HISTORY})})]})]})}function V(e){let{event:t,guildId:i,channelId:n}=e;return t.eventType===j.i.ACTIVITY_ENDED?(0,l.jsx)(P,{event:t,guildId:i,channelId:n}):t.eventType===j.i.USER_LEFT?(0,l.jsx)(G,{event:t,guildId:i,channelId:n}):null}function k(e){let{channel:t}=e,i=(0,h.H)(t),n=(0,A.Ay)(t);return(0,l.jsxs)("div",{className:O.hY,children:[(0,l.jsx)(d.H,{size:"custom",color:a.A.colors.ICON_FEEDBACK_POSITIVE,height:20,width:20}),(0,l.jsx)(r.E,{variant:"text-md/medium",className:O.HA,children:n}),null!=i&&(0,l.jsx)(g.z,{textColor:"text-feedback-positive",entry:{start:i}})]})}function L(e){let{channel:t,source:i,onMouseEnter:a,onMouseLeave:c}=e;n.useEffect(()=>{(0,y.q)(t.id)},[t.id]);let o=(0,s.bG)([S.A],()=>S.A.getHistory(t.id),[t.id]),d=o.length>0;return(n.useEffect(()=>{d&&C.default.track(T.HAw.OPEN_POPOUT,{type:"Voice Channel History",channel_id:t.id,source:i})},[d,t.id,i]),d)?(0,l.jsxs)("div",{role:"dialog","aria-label":b.intl.string(b.t.N0ED9s),className:O.kL,onMouseEnter:a,onMouseLeave:c,children:["voice_channel"===i?(0,l.jsx)(k,{channel:t}):null,(0,l.jsx)(u.Ip,{children:(0,l.jsxs)("div",{className:O.PI,children:[(0,l.jsx)("div",{className:O.s8,children:(0,l.jsx)(r.E,{variant:"text-sm/medium",color:"text-muted",children:b.intl.string(b.t.N0ED9s)})}),(0,l.jsx)("ol",{className:O.Gz,children:o.map(e=>(0,l.jsx)(V,{event:e,guildId:t.guild_id,channelId:t.id},e.key))})]})})]}):null}}