import type { Ref } from 'react';
import type { DropdownProps } from '../Dropdown/Dropdown.types';
import type { OverlayProps } from '../Overlay/Overlay';
import type { Placement, Props } from '../_utils/types';
export declare const rootId = "ROOT_ID";
export declare type Action = {
    type: 'highlight';
    option: FlyoutOption;
} | {
    type: 'expand';
    option: FlyoutOption;
} | {
    type: 'collapse';
    option: FlyoutOption;
} | {
    type: 'close';
} | {
    type: 'open';
} | {
    type: 'setMouseOver';
    isMouseOver: boolean;
} | {
    type: 'setFocused';
    isFocused: boolean;
} | {
    type: 'updateOptions';
    options: FlyoutOption[];
};
declare type ExpandedItem = FlyoutOptionId;
export declare type State = {
    highlighted: FlyoutOption;
    expanded: ExpandedItem[];
    options: FlyoutOption[];
    isMouseOver: boolean;
    isFocused: boolean;
    isOpen: boolean;
};
export interface DropdownOption {
    value: any;
    label: string;
    children?: DropdownOption[];
}
declare type OptionId = string;
export interface FlyoutOption {
    /**
     * @since 10.19.0
     */
    id: OptionId;
    /**
     * @since 10.19.0
     */
    parentId: OptionId | typeof rootId;
    /**
     * @since 10.19.0
     */
    origin: DropdownOption;
    /**
     * @since 10.19.0
     */
    children?: FlyoutOption[];
}
export declare type FlyoutOptionId = FlyoutOption['id'] | typeof rootId;
export interface FlyoutCaptionProps extends React.HTMLAttributes<HTMLDivElement> {
    option: DropdownOption;
    highlighted: boolean;
    optionRenderer: (option: DropdownOption) => React.ReactNode;
}
export interface FlyoutListProps extends React.HTMLAttributes<HTMLDivElement> {
    options: FlyoutOption[];
    overlayRef: Ref<HTMLDivElement>;
    placement: Placement;
    referenceEl: HTMLElement | null;
    offset?: number;
}
export interface DropdownFlyoutProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'onClick'> {
    children?: React.ReactNode | React.FunctionComponent<{
        isOpen?: boolean;
    }>;
    /**
     * @since 10.19.0
     */
    disabled?: DropdownProps['disabled'];
    /**
     * The text of the button.
     * @since 10.19.0
     */
    label?: DropdownProps['label'];
    /**
     * @since 10.19.0
     */
    loading?: DropdownProps['loading'];
    /**
     * The icon of the button.
     * @since 10.19.0
     */
    icon?: DropdownProps['icon'];
    /**
     * Data of the dropdown options - `Option[]`
     * ```
     * type Option = { label: string; children?: Option[] }
     * ```
     * @since 10.19.0
     */
    options: DropdownOption[];
    /**
     * Callback for click on dropdown option
     * ```
     * (option: Option) => void
     * ```
     * @since 10.19.0
     */
    onClick?: (option: DropdownOption) => void;
    /**
     * Render prop to specify custom dropdown option content
     * ```
     * (option: Option) => ReactNode
     * ```
     * @since 10.19.0
     */
    optionRenderer?: (option: DropdownOption) => React.ReactNode;
    /**
     * @default 'right-bottom'
     * @since 10.19.0
     */
    placement?: OverlayProps['placement'];
    /**
     * The button size
     * @default 'md'
     * @since 10.19.0
     */
    size?: DropdownProps['size'];
    /**
     * @default 'secondary'
     * @since 10.19.0
     */
    variant?: DropdownProps['variant'];
}
export interface FlyoutItemProps extends Props {
    option: FlyoutOption;
}
export {};
