{"version":3,"file":"UnreadCountBadge.mjs","names":[],"sources":["../../../../src/components/Threads/UnreadCountBadge.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React from 'react';\nimport type { PropsWithChildren } from 'react';\n\nexport const UnreadCountBadge = ({\n  children,\n  count,\n  position,\n}: PropsWithChildren<{\n  count: number;\n  position?: 'top-right' | 'bottom-right' | 'bottom-left' | 'top-left';\n}>) => (\n  // Only the badge is hidden from assistive tech, because the consumer already conveys the count\n  // in an accessible name (e.g. the threads selector's `aria-label`) and it would be read twice.\n  <div className='str-chat__unread-count-badge-container'>\n    {children}\n    {count > 0 && (\n      <div\n        aria-hidden='true'\n        className={clsx(\n          'str-chat__unread-count-badge',\n          position && `str-chat__unread-count-badge--${position}`,\n        )}\n      >\n        {count}\n      </div>\n    )}\n  </div>\n);\n"],"mappings":";;;;AAIA,IAAa,oBAAoB,EAC/B,UACA,OACA,eAOA,qBAAC,OAAD;CAAK,WAAU;WAAf,CACG,UACA,QAAQ,KACP,oBAAC,OAAD;EACE,eAAY;EACZ,WAAW,KACT,gCACA,YAAY,iCAAiC,UAC/C;YAEC;CACE,CAAA,CAEJ"}