import { Meta, Canvas, ArgTypes } from '@storybook/addon-docs/blocks'
import * as NaturalLanguageGroupStory from './natural-language-group.stories'

<Meta title="pv-form/NaturalLanguageForm/NaturalLanguageSelect/NaturalLanguageGroup" />

# NaturalLanguageGroup

The type `NaturalLanguageGroup` can be passed to `options` of the [NaturalLanguageSelect](/docs/pv-form-naturallanguageform-naturallanguageselect--docs).
The options in the group are [NaturalLanguageOption](/docs/pv-form-naturallanguageform-naturallanguageselect-naturallanguageoption--docs) objects.

### Type Definition

`NaturalLanguageGroup` takes a generic parameter that will define the type of the `value` of the contained `NaturalLanguageOption` objects. The default is `string | number`.

```tsx
type NaturalLanguageGroup<T> = {
  options: NaturalLanguageOption<T>[]
  ...
}
```

<ArgTypes of={NaturalLanguageGroupStory} />
