{"version":3,"file":"ChatFilter.cjs","names":[],"sources":["../../../src/components/ChatFilter/ChatFilter.tsx"],"sourcesContent":["/*\n * Copyright 2025 New Vector Ltd\n *\n * SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\n * Please see LICENSE files in the repository root for full details.\n */\n\nimport React, { type ForwardedRef, forwardRef } from \"react\";\nimport {\n  UnstyledButton,\n  type UnstyledButtonPropsFor,\n} from \"../Button/UnstyledButton\";\nimport styles from \"./ChatFilter.module.css\";\n\ntype ChatFilterProps = Omit<UnstyledButtonPropsFor<\"button\">, \"disabled\"> & {\n  /**\n   * Whether the filter is selected.\n   */\n  selected?: boolean;\n};\n\n/**\n * A chat filter button.\n */\nexport const ChatFilter = forwardRef(function ChatFilter(\n  { children, selected, ...props }: ChatFilterProps,\n  ref: ForwardedRef<HTMLButtonElement>,\n): React.ReactElement {\n  return (\n    <UnstyledButton\n      {...props}\n      className={styles[\"chat-filter\"]}\n      aria-selected={selected}\n      as=\"button\"\n      ref={ref}\n      tabIndex={0}\n    >\n      {children}\n    </UnstyledButton>\n  );\n});\n"],"mappings":";;;;;;;;;;AAwBA,IAAa,cAAA,GAAA,MAAA,YAAwB,SAAS,WAC5C,EAAE,UAAU,UAAU,GAAG,SACzB,KACoB;AACpB,QACE,iBAAA,GAAA,kBAAA,KAAC,uBAAA,gBAAD;EACE,GAAI;EACJ,WAAW,0BAAA,QAAO;EAClB,iBAAe;EACf,IAAG;EACE;EACL,UAAU;EAET;EACc,CAAA;EAEnB"}