import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import classNames from 'classnames';
import { CopyIcon } from '../../../../lib/icons/Copy.js';
import { 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 const NestedSupportedDeviceTableManufacturerKeys = withRequiredCommonProps(SupportedDeviceTableManufacturerKeys);
export function SupportedDeviceTableManufacturerKeys({ className, } = {}) {
    useComponentTelemetry('SupportedDeviceTableManufacturerKeys');
    const { manufacturers } = useManufacturers();
    return (_jsx("div", { className: classNames('supported-device-table-manufacturer-keys', className), children: manufacturers?.map((manufacturer) => (_jsx(ManufacturerKey, { manufacturer: manufacturer }, manufacturer.manufacturer_id))) }));
}
function ManufacturerKey({ manufacturer, }) {
    const key = manufacturer.display_name;
    return (_jsxs("div", { className: 'seam-manufacturer-key', children: [_jsx("div", { className: 'seam-manufacturer-key-value', children: key }), _jsx(MenuItem, { className: 'seam-copy-button', onClick: () => {
                    void copyToClipboard(key);
                }, children: _jsx(CopyIcon, {}) })] }));
}
//# sourceMappingURL=SupportedDeviceTableManufacturerKeys.js.map