{"version":3,"file":"ChannelDetailNavButton.mjs","names":[],"sources":["../../../../src/plugins/ChannelDetail/ChannelDetailNavButton.tsx"],"sourcesContent":["import React, { type ComponentType } from 'react';\n\nimport type { SectionNavigatorNavButtonProps } from './SectionNavigator';\nimport { ListItemLayout } from '../../components/ListItemLayout';\nimport clsx from 'clsx';\n\nexport type ChannelDetailNavButtonProps = SectionNavigatorNavButtonProps & {\n  /** Icon at the start of the button. */\n  LeadingIcon: ComponentType;\n  /** Section label. */\n  title: string;\n};\n\n/**\n * Button shared by the ChannelDetail section nav buttons: a `ListItemLayout` rendered as a\n * `<button>` whose `aria-current` and click handler follow the `SectionNavigator` selection.\n */\nexport const ChannelDetailNavButton = ({\n  className,\n  LeadingIcon,\n  // Dropped so it is not forwarded onto the DOM <button> via `...props`.\n  sectionId: _sectionId, // eslint-disable-line @typescript-eslint/no-unused-vars\n  select,\n  selected,\n  title,\n  ...props\n}: ChannelDetailNavButtonProps) => (\n  <ListItemLayout\n    LeadingIcon={LeadingIcon}\n    RootElement='button'\n    rootProps={{\n      ...props,\n      'aria-current': selected ? ('page' as const) : undefined,\n      className: clsx('str-chat__channel-detail__nav-button', className),\n      onClick: select,\n    }}\n    selected={selected}\n    title={title}\n  />\n);\n"],"mappings":";;;;;;;;;AAiBA,IAAa,0BAA0B,EACrC,WACA,aAEA,WAAW,YACX,QACA,UACA,OACA,GAAG,YAEH,oBAAC,gBAAD;CACe;CACb,aAAY;CACZ,WAAW;EACT,GAAG;EACH,gBAAgB,WAAY,SAAmB,KAAA;EAC/C,WAAW,KAAK,wCAAwC,SAAS;EACjE,SAAS;CACX;CACU;CACH;AACR,CAAA"}