import React from 'react'; import { ISuggestProps, IItemRendererProps } from '@blueprintjs/select'; import { IconProps } from '@harnessio/icons'; export interface SelectWithBiLevelOption { /** label for the item */ label: string; /** value for the item */ value: string | number | symbol; /** checks if the item has some subitems */ hasSubmenuItems?: boolean; /** icon to render in defaultItemRenderer */ icon?: IconProps; /** right icon to render in defaultItemRenderer */ rightIcon?: IconProps; /** list of all subitems */ submenuItems?: SelectWithBiLevelOption[]; } export declare enum SelectSize { Small = "small", Medium = "medium", Large = "large" } declare type BiLevelProps = ISuggestProps; export interface BiLevelSelectProps extends Omit { inputValueRender?: BiLevelProps['inputValueRenderer']; /** This is custom item renderer in which user can provide custom icons for parent and child item */ itemRenderer?: BiLevelProps['itemRenderer']; onChange?: BiLevelProps['onItemSelect']; value?: BiLevelProps['selectedItem']; size?: SelectSize; items: BiLevelProps['items'] | (() => Promise); allowCreatingNewItems?: boolean; name?: string; whenPopoverClosed?: (node: HTMLElement) => void; addClearBtn?: boolean; usePortal?: boolean; popoverClassName?: string; onQueryChange?: BiLevelProps['onQueryChange']; addTooltip?: boolean; borderless?: boolean; loadingItems?: boolean; } export declare function defaultItemRenderer(item: SelectWithBiLevelOption, props: IItemRendererProps, size?: SelectSize): JSX.Element | null; export declare function createNewItemFromQuery(query: string): SelectWithBiLevelOption; /** * @description This component renders SelectWithBiLevelOption type items which has more features than SelectOption which can help user to manipulate custom itemRenderer. * * @param props itemRenderer onChange value * props itemRenderer - This is custom item renderer in which user can provide custom icons for parent and child item * @returns ReactElement */ export declare function BiLevelSelect(props: BiLevelSelectProps): React.ReactElement; export declare function NoMatch(): React.ReactElement; export {};