import type { ListItemProps } from '@planview/pv-uikit'; import React from 'react'; import type { NaturalLanguageDropdownMenuProps } from './dropdown-menu'; export type NaturalLanguageGroup = { /** * Can the group heading be collapsed and expanded. When set to false, a ListGroup is rendered instead of a ListExpandableSection. */ expandable?: boolean; /** * Is the group heading currently expanded or collapsed? When omitted (uncontrolled), the state will be reset each time the menu opens. */ expanded?: boolean; /** * Callback when the heading is expanded or collapsed */ onChange?: (nextState: boolean) => void; /** * Label for the group heading */ label: string; /** * Array of options in this group */ options: NaturalLanguageOption[]; }; export type NaturalLanguageSearchResults = { /** * Number of results being shown */ count: number; /** * Total number of results available. When this number does not match count, a footer will be shown below the options asking the user to refine their search. */ total: number; /** * Array of options or groups */ options: (NaturalLanguageOption | NaturalLanguageGroup)[]; /** * Customized label overriding the default label in footer asking the user to refine their search. */ labelRefineSearch?: React.ReactNode; }; export type NaturalLanguageOption = Omit & { /** * Unique value of the option */ value: T; }; export type NaturalLanguageSelectProps = { /** When no value or defaultValue are present, render this text as a placeholder */ placeholder?: string; /** * Controlled value for the field. Can be a simple value that will be matched against * the provided options, or it can be a full NaturalLanguageOption object in situations * where the provided options may not include the currently selected value. * */ value?: null | T | NaturalLanguageOption; /** Same as value, but uncontrolled */ defaultValue?: null | T | NaturalLanguageOption; /** * Options configuration. May be an array of options, groups of options, or search results. * * Read more about each type on their respective documentation pages: * - [NaturalLanguageGroup](https://planview-ds.github.io/react-pvds/?path=/docs/pv-form-naturallanguageform-naturallanguageselect-naturallanguagegroup--docs) * - [NaturalLanguageOption](https://planview-ds.github.io/react-pvds/?path=/docs/pv-form-naturallanguageform-naturallanguageselect-naturallanguageoption--docs) * - [NaturalLanguageSearchResults](https://planview-ds.github.io/react-pvds/?path=/docs/pv-form-naturallanguageform-naturallanguageselect-naturallanguagesearchresults--docs) * */ options: (NaturalLanguageGroup | NaturalLanguageOption)[] | NaturalLanguageSearchResults; /** * Callback when a new option is selected. */ onChange?: (value: NaturalLanguageOption) => void; } & Omit; export declare const NaturalLanguageSelect: ({ value: valueIncoming, defaultValue, label, placeholder, options: optionsIncoming, onChange, ...props }: NaturalLanguageSelectProps) => React.JSX.Element; //# sourceMappingURL=select.d.ts.map