import React from 'react'; import { OnOpenHandler, OptionValues } from 'react-select'; import { IHierarchicalOption } from './helpers'; interface IHierarchicalSelectInputProps { /** ID of the input */ id?: string; /** Input name */ name?: string; /** Input value */ value?: OptionValues | OptionValues[]; /** Placeholder label when no option is selected */ placeholder?: string | JSX.Element; /** Value when no option is selected */ emptyValue?: OptionValues | null; /** Text to display when no results found */ noResultsText?: string | JSX.Element; /** * Array of hierarchical options to display. * These options must have a property called parentValue to allow for creating a hierarchy of options. * The hierarchy itself will be generated on the component, preserving the order of options given * but grouping items as expected under their parents. * * Note that values of null/undefined are not supported. */ hierarchicalOptions: readonly IHierarchicalOption[]; /** Should an 'x' be shown which clears select inputs? */ isClearable?: boolean; /** If true, sets input to disabled state */ isDisabled?: boolean; /** If true, adds invalid input class to component */ isInvalid?: boolean; /** If true, allows selecting multiple options */ isMultiSelect?: boolean; /** Should the input autoselect an option when there is only one provided? */ shouldAutoSelectWhenSingleOption?: boolean; /** Should close the menu when an item is selected? */ shouldCloseOnSelect?: boolean; /** Called when the input is changed */ onChange?: (value?: OptionValues | OptionValues[] | null) => void; /** Handler for opening the select menu */ onOpen?: OnOpenHandler; /** Handler for input being updated when user type to search */ onInputChange?: (input: string) => void; /** The data-cy */ componentContext?: string; } declare const HierarchicalSelectInput: React.FC>; export { HierarchicalSelectInput, IHierarchicalSelectInputProps };