Build 533169stable
Module 465738
1,221 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>A});var r=n(627968),i=n(64700),s=n(503698),a=n.n(s),o=n(91871),l=n.n(o),u=n(735438),c=n.n(u),d=n(158954),_=n(311907),f=n(397927),p=n(676608),h=n(317525),m=n(652215),E=n(985018),g=n(673753);let A=function(e){let{className:t,guild:n,roleStyle:s,roleFilter:o,onSelect:u,onClose:A}=e,I=(0,_.bG)([h.A],()=>h.A.getSortedRoles(n.id)),T=(0,p.Ay)(n.id,null),S=i.useMemo(()=>c()(I).filter(o).map(e=>({id:e.id,value:e.id,label:e.name,leading:"dot"===s?(0,r.jsx)(f.WYI,{className:g.b8,color:e.colorString??m.TpD,colors:T?e.colorStrings:null,background:!1,tooltip:!1}):(0,r.jsx)(f.RYH,{className:g.kb,color:e.colorString??m.TpD,colors:T?e.colorStrings:null})})).value(),[I,o,s,T]),y=i.useCallback((e,t)=>""===t.trim()?e:e.filter(e=>l()(t.toLowerCase(),e.label.toLowerCase())),[]);return(0,r.jsx)(f.lGe,{className:a()(g.kL,t),"aria-label":E.intl.string(E.t.ljnBlo),children:(0,r.jsxs)(f.iS7,{selectionMode:"single",value:void 0,onSelectionChange:e=>{null!=e&&(u(e),A())},options:S,customMatchSorter:y,children:[(0,r.jsx)(f.a32,{label:E.intl.string(E.t.ljnBlo),hideLabel:!0,placeholder:E.intl.string(E.t.XPGZXP),autoFocus:!0}),(0,r.jsx)(f.X2W,{renderListItem:e=>(0,r.jsx)(d.c$x,{...e})})]})})}}