import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
import { memo } from 'react';
import { FieldLabel, Tag, ToggleButton } from '../common/index.js';
import { styled } from '../../styled-components.js';
export function SimpleEnumsComponent({ enums, type, toggle, showToggleButton, toggleButtonText, translate, }) {
    return (_jsxs(Row, { "data-testid": "simple-enums", children: [_jsxs(FieldLabel, { children: [type === 'array' ? translate('openapi.items', 'Items') : '', ' ', enums.length === 1
                        ? translate('openapi.value', 'Value')
                        : translate('openapi.enum', 'Enum')] }), enums.map((value, idx) => (_jsx(Tag, { children: JSON.stringify(value) }, value + idx))), showToggleButton ? _jsx(ToggleButton, { onClick: toggle, children: toggleButtonText }) : null] }));
}
export const SimpleEnums = memo(SimpleEnumsComponent);
const Row = styled.div `
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-xxs);
  margin-top: var(--spacing-xxs);
`;
//# sourceMappingURL=SimpleEnums.js.map