import{jsxs as o,jsx as p}from"react/jsx-runtime";import{memo as l}from"react";import{FieldLabel as x,Tag as c,ToggleButton as d}from"../common/index.js";import{styled as g}from"../../styled-components.js";function u({enums:i,type:m,toggle:r,showToggleButton:s,toggleButtonText:t,translate:e}){return o(f,{"data-testid":"simple-enums",children:[o(x,{children:[m==="array"?e("openapi.items","Items"):""," ",i.length===1?e("openapi.value","Value"):e("openapi.enum","Enum")]}),i.map((n,a)=>p(c,{children:JSON.stringify(n)},n+a)),s?p(d,{onClick:r,children:t}):null]})}const w=l(u),f=g.div`
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-xxs);
  margin-top: var(--spacing-xxs);
`;export{w as SimpleEnums,u as SimpleEnumsComponent};
