import React from 'react';
import { MenuRef, Selection } from '../MenuImperative/MenuImperative.types';
import { SelectProps } from '../Select/Select.types';
export declare type GetValueStringFn = (value: any[]) => string | undefined;
export declare type GetValueString = 'full-path' | 'leaf-only' | GetValueStringFn;
export declare type Div = React.ComponentPropsWithoutRef<'div'>;
export declare type Id = number | string | null | undefined;
export interface Tier {
    /**
     * @since 10.19.0
     */
    id?: Id;
    /**
     * @since 10.19.0
     */
    label?: string;
    /**
     * @since 10.19.0
     */
    nextGroupId?: Id;
    /**
     * @since 10.19.0
     */
    groupId?: Id;
}
export interface TierSelection extends Selection {
    /**
     * @since 10.19.0
     */
    value: any[];
}
export interface InternalTieredSelectProps extends Omit<Div, 'onSelect' | 'onChange'> {
    /**
     * @since 10.19.0
     */
    block?: SelectProps['block'];
    /**
     * @since 10.19.0
     */
    disabled?: SelectProps['disabled'];
    /**
     * @since 10.19.0
     */
    error?: SelectProps['error'];
    /**
     * @since 10.19.0
     */
    loading?: SelectProps['loading'];
    /**
     * @since 10.19.0
     */
    options?: any[];
    /**
     * @since 10.19.0
     */
    value?: any[];
}
export interface TieredSelectApi {
    /**
     * @since 10.19.0
     */
    afterHide: SelectProps['afterHide'];
    /**
     * @since 10.19.0
     */
    afterShow: SelectProps['afterShow'];
    /**
     * @since 10.19.0
     */
    beforeHide: SelectProps['beforeHide'];
    /**
     * @since 10.19.0
     */
    beforeShow: SelectProps['beforeShow'];
    /**
     * @since 10.19.0
     */
    block?: boolean;
    /**
     * Callback for using a custom <Code>tier</Code> shape
     * <CodeBlock>{'(tier: any) => Id'}</CodeBlock>
     * Defaults to <CodeBlock>{'(tier: any) => tier.GroupId'}</CodeBlock>
     * @since 10.19.0
     */
    getGroupId: (tier: any) => Id;
    /**
     * Callback for using a custom <Code>tier</Code> shape
     * <CodeBlock>{'(tier: any) => Id'}</CodeBlock>
     * Defaults to <CodeBlock>{'(tier: any) => tier.Id'}</CodeBlock>
     * @since 10.19.0
     */
    getId: (tier: any) => Id;
    /**
     * Callback for using a custom <Code>tier</Code> shape
     * <CodeBlock>{'(tier: any) => string'}</CodeBlock>
     * Defaults to <CodeBlock>{'(tier: any) => tier.Label'}</CodeBlock>
     * @since 10.19.0
     */
    getLabel: (tier: any) => string | undefined;
    /**
     * Callback for using a custom <Code>tier</Code> shape
     * <CodeBlock>{'(tier: any) => Id'}</CodeBlock>
     * Defaults to <CodeBlock>{'(tier: any) => tier.NextGroupId'}</CodeBlock>
     * @since 10.19.0
     */
    getNextGroupId: (tier: any) => Id;
    /**
     * Predefined strings or a callback for using a custom <Code>value</Code>{' '}
     * string
     * <CodeBlock>{'(value: any[]) => string | undefined'}</CodeBlock>
     * Defaults to{' '}
     * <CodeBlock>
     * {
     *     '(value: any[]) => value.map((tier) => getLabel!(tier)).join(" > ")'
     * }
     * </CodeBlock>
     * @since 10.19.0
     */
    getValueString: GetValueStringFn;
    /**
     * The i18n key to use for the tiered select's configurable strings.
     * Defaults to using the core library's default strings.
     * @since 10.19.0
     */
    i18nScope: string;
    /**
     * @since 10.19.0
     */
    isTierDisabled?: (tier: any) => boolean | string | undefined;
    /**
     * @since 10.19.0
     */
    isLeaf?: (tier: any) => boolean;
    /**
     * Used to display a loading indicator as the last item of the list. Can
     * be used with <Code>onScrollBottom</Code> or <Code>onSearch</Code>{' '}
     * (empty <Code>options</Code> during search async call) to indicate the
     * loading of new items.
     * @since 10.19.0
     */
    loadingMore?: boolean;
    /**
     * <div>
     *  Callback for selecting an item from the tiered select. Returns the{' '}
     *  <Code>Selection</Code> object from the <Code>Menu</Code> api, along
     *  with the updated <Code>value</Code>
     * </div>
     * <CodeBlock>
     *  {'(Selection: { event, item, group }, value) =>'}
     * </CodeBlock>
     * @since 10.19.0
     */
    onChange: (selection: TierSelection) => void;
    /**
     * Callback for when the x icon is pressed.
     * <CodeBlock>{'(event) =>'}</CodeBlock>
     * @since 10.19.0
     */
    onClear?: SelectProps['onClear'];
    /**
     * Callback for when navigation occurs. Triggered by the left and right
     * arrow keys, or clicking a navigable item. Returns the id of the next
     * group that will be navigated to, and the updated path.
     * <CodeBlock>
     *  {'(nextGroupId: string | number | undefined, path: any[]) => '}
     * </CodeBlock>
     * @since 10.19.0
     */
    onNavigate?: (nextGroupId: Id, value: any[]) => void;
    /**
     * Pass this callback when a quick create experience is desired. Called
     * when the "create" button in quick create mode is clicked. Returns the
     * value of the quick create input.
     * <CodeBlock>{'(string) =>'}</CodeBlock>
     * @since 10.19.0
     */
    onQuickCreate?: (name: string) => void;
    /**
     * Called when the selection menu is scrolled to the bottom. Can be
     * combined with <Code>loadingMore</Code>
     * for an async infinite scrolling menu.
     * <CodeBlock>{'(event) =>'}</CodeBlock>
     * @since 10.19.0
     */
    onScrollBottom?: SelectProps['onScrollBottom'];
    /**
     * Called when searching the TieredSelect. Behavior must be controlled by
     * implementor
     * <CodeBlock>{'(event) =>'}</CodeBlock>
     * @since 10.19.0
     */
    onSearch?: SelectProps['onSearch'];
    /**
     * @since 10.19.0
     */
    tabIndex?: number;
}
export interface TieredSelectProps extends Partial<Omit<TieredSelectApi, 'getValueString'>>, Omit<Div, 'onSelect' | 'onChange'> {
    /**
     * @since 10.19.0
     */
    block?: SelectProps['block'];
    /**
     * @since 10.19.0
     */
    disabled?: SelectProps['disabled'];
    /**
     * @since 10.19.0
     */
    error?: SelectProps['error'];
    /**
     * Prop to define a custom footer for the tiered select. Accepts a `React.ReactNode`. Takes precedence over quick create footer.
     *
     * Example:
     * ```tsx
     * <TieredSelect
     *   ...
     *   footer={<div>Custom Footer</div>}
     *   ...
     * />
     * ```
     *
     * @default undefined
     * @since 11.4.0
     */
    footer?: React.ReactNode;
    /**
     * @since 10.19.0
     */
    getValueString?: GetValueString;
    /**
     * @since 10.19.0
     */
    loading?: SelectProps['loading'];
    /**
     * Flat array of tier objects, this array is used as data for the component
     * @since 10.19.0
     */
    options?: any[];
    /**
     * If true, any tier is selectable. If false, only leaf nodes are selectable
     * @default true
     * @since 10.19.0
     */
    selectableTiers?: boolean;
    /**
     * Flat array of tier objects that represents the selected value
     * @since 10.19.0
     */
    value?: any[];
}
export interface TieredSelectMenuProps extends Omit<Div, 'onSelect' | 'onChange' | 'onDragEnd'>, Pick<TieredSelectProps, 'footer' | 'loading' | 'loadingMore' | 'options'> {
    /**
     * @since 10.19.0
     */
    currentTier: Id;
    /**
     * @since 10.19.0
     */
    menuRef: React.RefObject<MenuRef>;
    /**
     * @since 10.19.0
     */
    onChange: (selection: TierSelection) => void;
    /**
     * @since 10.19.0
     */
    onNavigate: (nextGroupId: Id, value: any[]) => void;
    /**
     * @since 10.19.0
     */
    onSearch: (e: React.ChangeEvent<HTMLInputElement>) => void;
    /**
     * @since 10.19.0
     */
    previousValue: any[];
    /**
     * @since 10.19.0
     */
    value: any[];
}
export interface ArrowButtonProps {
    /**
     * @since 10.19.0
     */
    onClick?: (event: React.SyntheticEvent) => void;
}
export interface QuickCreateInputProps {
    /**
     * @since 10.19.0
     */
    autoFocus: boolean;
    /**
     * @since 10.19.0
     */
    onSubmit: (name: string) => void;
    /**
     * @since 10.19.0
     */
    placeholder: string;
}
export interface OptionsProps {
    /**
     * @since 10.19.0
     */
    children: React.ReactNode;
    /**
     * @since 10.19.0
     */
    emptyMessage?: string;
}
