Build 533169stable
Module 827437
1,076 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(627968),i=n(64700),s=n(397927),a=n(793574),o=n(688810),l=n(315246),u=n(92240),c=n(679492),d=n(645463),_=n(985018);function f(e){let{children:t,user:n,activity:f,entry:p,display:h,onSelect:m,onClose:E,appContext:g,targetElementRef:A}=e,[I,T]=i.useState(!1),{analyticsLocations:S}=(0,o.Ay)(a.A.USER_PROFILE_ACTIVITY_CONTEXT_MENU),y=(0,u.A)({display:h,user:n,activity:f,entry:p,analyticsLocations:S}),v=(0,c.NR)(),N=i.useRef(null),C=v?.interactionPopoutTargetRef??N,R=(0,d.A)({entry:p,activity:f,user:n,display:h,onClose:E,onAction:y,isMenuOpen:I,appContext:g});return 0===R.length||n.bot?null:(0,r.jsx)(s.YNO,{targetElementRef:A??C,align:"top",position:"right",disablePointerEvents:!1,onRequestOpen:()=>{y({action:"OPEN_MENU"}),T(!0)},renderPopout:e=>{let{closePopout:t}=e;return(0,r.jsx)("div",{onClick:e=>e.stopPropagation(),children:(0,r.jsx)(s.W1t,{"data-menu-migrated-auto":!0,navId:l.n,onClose:()=>{t(),T(!1)},"aria-label":_.intl.string(_.t.PlAQz1),onSelect:m,children:(0,r.jsx)(s.rXV,{children:R})})})},children:t})}}