{"version":3,"file":"VisualListItem.cjs","names":[],"sources":["../../../src/components/VisualList/VisualListItem.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, {\n  type ComponentType,\n  type JSX,\n  type PropsWithChildren,\n} from \"react\";\nimport styles from \"./VisualListItem.module.css\";\nimport classNames from \"classnames\";\n\ninterface VisualListItemProps extends React.HTMLProps<HTMLLIElement> {\n  /**\n   * The CSS class name.\n   */\n  className?: string;\n  /**\n   * The icon component.\n   */\n  Icon: ComponentType<React.SVGAttributes<SVGElement>>;\n\n  success?: boolean;\n  destructive?: boolean;\n}\n\n/**\n * A list component.\n */\nexport function VisualListItem({\n  className,\n  children,\n  Icon,\n  success = false,\n  destructive = false,\n  ...props\n}: PropsWithChildren<VisualListItemProps>): JSX.Element {\n  return (\n    <li\n      className={classNames(styles[\"visual-list-item\"], className)}\n      {...props}\n    >\n      <Icon\n        className={classNames(styles[\"visual-list-item-icon\"], {\n          [styles[\"visual-list-item-icon-success\"]]: success,\n          [styles[\"visual-list-item-icon-destructive\"]]: destructive,\n        })}\n        width=\"24px\"\n        height=\"24px\"\n        aria-hidden={true}\n      />\n      {children}\n    </li>\n  );\n}\n"],"mappings":";;;;;;;;;;;AAgCA,SAAgB,eAAe,EAC7B,WACA,UACA,MACA,UAAU,OACV,cAAc,OACd,GAAG,SACmD;AACtD,QACE,iBAAA,GAAA,kBAAA,MAAC,MAAD;EACE,YAAA,GAAA,WAAA,SAAsB,8BAAA,QAAO,qBAAqB,UAAU;EAC5D,GAAI;YAFN,CAIE,iBAAA,GAAA,kBAAA,KAAC,MAAD;GACE,YAAA,GAAA,WAAA,SAAsB,8BAAA,QAAO,0BAA0B;KACpD,8BAAA,QAAO,mCAAmC;KAC1C,8BAAA,QAAO,uCAAuC;IAChD,CAAC;GACF,OAAM;GACN,QAAO;GACP,eAAa;GACb,CAAA,EACD,SACE"}