import type { Manufacturer } from '@seamapi/types/devicedb' import classNames from 'classnames' import { CopyIcon } from 'lib/icons/Copy.js' import { type CommonProps, withRequiredCommonProps, } from 'lib/seam/components/common-props.js' import { useComponentTelemetry } from 'lib/telemetry/index.js' import { copyToClipboard } from 'lib/ui/clipboard.js' import { MenuItem } from 'lib/ui/Menu/MenuItem.js' import { useManufacturers } from './use-manufacturers.js' export interface SupportedDeviceTableManufacturerKeysProps extends CommonProps {} export const NestedSupportedDeviceTableManufacturerKeys = withRequiredCommonProps(SupportedDeviceTableManufacturerKeys) export function SupportedDeviceTableManufacturerKeys({ className, }: SupportedDeviceTableManufacturerKeysProps = {}): JSX.Element { useComponentTelemetry('SupportedDeviceTableManufacturerKeys') const { manufacturers } = useManufacturers() return (
{manufacturers?.map((manufacturer) => ( ))}
) } function ManufacturerKey({ manufacturer, }: { manufacturer: Manufacturer }): JSX.Element { const key = manufacturer.display_name return (
{key}
{ void copyToClipboard(key) }} >
) }