Build 576754stable
Module 515054
1,819 characters · in ad3fccc0e5cfe756.js, a9a0b04623ac0dcd.jsDependencies
Source Raw
function(e,t,i){i.d(t,{A:()=>S,K:()=>T});var n=i(627968),s=i(64700),l=i(503698),r=i.n(l),a=i(364522),u=i(761508),c=i(707554),o=i(140735),d=i(207803),g=i(183555),f=i(61881),m=i(790417),I=i(113763),x=i(583246),E=i(53069),p=i(110496),h=i(518477),A=i(275365);function T(e){let{children:t,className:i,scrollerRef:s,...l}=e;return(0,n.jsx)(a.Ip,{ref:s,className:r()(A.gN,i),fade:!0,...l,children:t})}function j(e){let{user:t,currentUser:i,section:s,displayProfile:l,guildId:r,channelId:a,onClose:u}=e;return s===h.RP.ACTIVITY?(0,n.jsx)(m.A,{user:t,currentUser:i,displayProfile:l,guildId:r,channelId:a,onClose:u}):s===h.RP.MUTUAL_FRIENDS?(0,n.jsx)(I.A,{user:t,guildId:r,channelId:a,onClose:u}):s===h.RP.MUTUAL_GUILDS?(0,n.jsx)(x.A,{user:t,onClose:u}):s===h.RP.WIDGETS?(0,n.jsx)(E.A,{user:t,guildId:r,channelId:a}):s===h.RP.WISHLIST?(0,n.jsx)(p.A,{profileOwner:t}):null}function S(e){let{user:t,currentUser:i,displayProfile:l,guildId:r,channelId:m,items:I,initialSection:x,onClose:E}=e,{trackUserProfileAction:p}=(0,g.NJ)(),[{section:T,text:S},_]=s.useState(I.find(e=>{let{section:t}=e;return t===x})??I[0]);return(0,n.jsxs)("div",{className:A.kL,children:[(0,n.jsx)(a.Ip,{orientation:"horizontal",className:A.gU,fade:!0,paddingFix:!1,children:(0,n.jsx)(u.V,{type:"top",look:"custom",selectedItem:T,onItemSelect:function(e){f.A.hasUnsavedChanges()&&T===h.RP.WIDGETS?(0,d.VQ)():(p({action:"PRESS_SECTION",section:e}),_(t=>I.find(t=>t.section===e)??t))},children:I.map(e=>(0,n.jsx)(u.V.Item,{className:A.YU,id:e.section,"aria-label":e.text,children:e.text},e.section))})}),(0,n.jsx)(u.V.Panel,{id:T,"aria-label":S,className:A.NM,children:(0,n.jsx)(c.F,{component:(0,n.jsx)(o.A,{children:(0,n.jsx)(c.H,{children:S})}),children:(0,n.jsx)(j,{user:t,currentUser:i,displayProfile:l,guildId:r,channelId:m,section:T,onClose:E})})})]})}}