{"version":3,"file":"RoleItem.mjs","names":[],"sources":["../../../../../../src/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React from 'react';\nimport type { RoleMentionSuggestion } from 'stream-chat';\nimport { ListItemLayout } from '../../../ListItemLayout';\nimport { useComponentContextIcons, useTranslationContext } from '../../../../context';\nimport { MentionSuggestionTitle } from './MentionSuggestionTitle';\nimport type { MentionItemComponentProps } from './types';\nimport { TokenizedSuggestionParts } from '../TokenizedSuggestionParts';\n\nexport type RoleItemProps = MentionItemComponentProps<RoleMentionSuggestion>;\n\nexport const RoleItem = ({ entity, focused, ...buttonProps }: RoleItemProps) => {\n  const { IconShield } = useComponentContextIcons();\n  void focused;\n  const { t } = useTranslationContext();\n  const role = entity.name;\n\n  return (\n    <ListItemLayout\n      contentClassName='str-chat__suggestion-list__item-content'\n      LeadingIcon={IconShield}\n      RootElement='button'\n      rootProps={{\n        ...buttonProps,\n        className: clsx(\n          'str-chat__context-menu__button',\n          buttonProps.className,\n          'str-chat__suggestion-list__mention',\n        ),\n        role: buttonProps.role ?? 'menuitem',\n        title: `@${role}`,\n      }}\n      selected={focused}\n      subtitle={t(\n        'textareaComposer.roleItem.notifyMembers.label',\n        'Notify all {{ role }} members',\n        { role },\n      )}\n      subtitleClassName='str-chat__suggestion-list__item-details'\n      title={\n        <MentionSuggestionTitle>\n          <TokenizedSuggestionParts tokenizedDisplayName={entity.tokenizedDisplayName} />\n        </MentionSuggestionTitle>\n      }\n      titleClassName='str-chat__suggestion-list__item-title str-chat__suggestion-list__mention-item-title'\n    />\n  );\n};\n"],"mappings":";;;;;;;;;AAWA,IAAa,YAAY,EAAE,QAAQ,SAAS,GAAG,kBAAiC;CAC9E,MAAM,EAAE,eAAe,yBAAyB;CAEhD,MAAM,EAAE,MAAM,sBAAsB;CACpC,MAAM,OAAO,OAAO;CAEpB,OACE,oBAAC,gBAAD;EACE,kBAAiB;EACjB,aAAa;EACb,aAAY;EACZ,WAAW;GACT,GAAG;GACH,WAAW,KACT,kCACA,YAAY,WACZ,oCACF;GACA,MAAM,YAAY,QAAQ;GAC1B,OAAO,IAAI;EACb;EACA,UAAU;EACV,UAAU,EACR,iDACA,iCACA,EAAE,KAAK,CACT;EACA,mBAAkB;EAClB,OACE,oBAAC,wBAAD,EAAA,UACE,oBAAC,0BAAD,EAA0B,sBAAsB,OAAO,qBAAuB,CAAA,EACxD,CAAA;EAE1B,gBAAe;CAChB,CAAA;AAEL"}