import { FormSection } from '@@/form-components/FormSection'; import { SwitchField } from '@@/form-components/SwitchField'; import { capabilities } from './types'; export type Values = string[]; export function CapabilitiesTab({ values, onChange, }: { values: Values; onChange: (values: Values) => void; }) { return (
{capabilities.map((cap) => (
{ if (value) { onChange([...values, cap.key]); } else { onChange(values.filter((v) => v !== cap.key)); } }} />
))}
); }