{"version":3,"file":"BroadcastMentionItem.mjs","names":[],"sources":["../../../../../../src/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React from 'react';\nimport type { ChannelMentionSuggestion, HereMentionSuggestion } from 'stream-chat';\nimport { ListItemLayout } from '../../../ListItemLayout';\nimport { useComponentContextIcons, useTranslationContext } from '../../../../context';\nimport { MentionSuggestionTitle } from './MentionSuggestionTitle';\nimport type { MentionItemComponentProps } from './types';\n\nexport type BroadcastMentionItemProps = MentionItemComponentProps<\n  ChannelMentionSuggestion | HereMentionSuggestion\n>;\n\nexport const BroadcastMentionItem = ({\n  entity,\n  focused,\n  ...buttonProps\n}: BroadcastMentionItemProps) => {\n  const { IconMegaphone } = useComponentContextIcons();\n  const { t } = useTranslationContext();\n  const description =\n    entity.mentionType === 'channel'\n      ? t('mention.channel.description', 'Notify everyone in this channel')\n      : t('mention.here.description', 'Notify every online member in this channel');\n\n  return (\n    <ListItemLayout\n      contentClassName='str-chat__suggestion-list__item-content'\n      description={description}\n      descriptionClassName='str-chat__suggestion-list__item-details'\n      LeadingIcon={IconMegaphone}\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: `@${entity.name}`,\n      }}\n      selected={focused}\n      title={<MentionSuggestionTitle>{entity.name}</MentionSuggestionTitle>}\n      titleClassName='str-chat__suggestion-list__item-title str-chat__suggestion-list__mention-item-title'\n    />\n  );\n};\n"],"mappings":";;;;;;;;AAYA,IAAa,wBAAwB,EACnC,QACA,SACA,GAAG,kBAC4B;CAC/B,MAAM,EAAE,kBAAkB,yBAAyB;CACnD,MAAM,EAAE,MAAM,sBAAsB;CAMpC,OACE,oBAAC,gBAAD;EACE,kBAAiB;EACJ,aAPf,OAAO,gBAAgB,YACnB,EAAE,+BAA+B,iCAAiC,IAClE,EAAE,4BAA4B,4CAA4C;EAM5E,sBAAqB;EACrB,aAAa;EACb,aAAY;EACZ,WAAW;GACT,GAAG;GACH,WAAW,KACT,kCACA,YAAY,WACZ,oCACF;GACA,MAAM,YAAY,QAAQ;GAC1B,OAAO,IAAI,OAAO;EACpB;EACA,UAAU;EACV,OAAO,oBAAC,wBAAD,EAAA,UAAyB,OAAO,KAA6B,CAAA;EACpE,gBAAe;CAChB,CAAA;AAEL"}