/// <reference types="react" />
import type { ButtonProps } from '../Button/Button.types';
import type { MenuRef, Selection } from '../MenuImperative/MenuImperative.types';
import type { OverlayTriggerProps } from '../OverlayTrigger/OverlayTrigger.types';
import type { Placement } from '../_utils/types';
declare type HTMLButtonProps = React.ComponentPropsWithoutRef<'button'>;
declare type HTMLDivProps = React.ComponentPropsWithoutRef<'div'>;
export declare type DropdownPlacement = Extract<Placement, 'bottom' | 'bottom-left' | 'bottom-right' | 'top' | 'top-left' | 'top-right'>;
export interface DropdownProps extends Omit<HTMLButtonProps, 'onSelect'> {
    /**
     * @since 10.19.0
     */
    afterHide?: OverlayTriggerProps['afterHide'];
    /**
     * @since 10.19.0
     */
    afterShow?: OverlayTriggerProps['afterShow'];
    /**
     * @since 10.19.0
     */
    beforeHide?: OverlayTriggerProps['beforeHide'];
    /**
     * @since 10.19.0
     */
    beforeShow?: OverlayTriggerProps['beforeShow'];
    /**
     * @since 10.19.0
     */
    block?: ButtonProps['block'];
    /**
     * @since 10.19.0
     */
    className?: ButtonProps['className'];
    /**
     * @since 10.19.0
     */
    disabled?: ButtonProps['disabled'];
    /**
     * @since 10.19.0
     */
    error?: boolean;
    /**
     * Content to render in a footer.
     * @since 10.19.0
     */
    footer?: React.ReactNode;
    /**
     * The i18n key to use for the dropdowns's configurable strings.
     * Defaults to using the core library's default strings.
     * @since 10.19.0
     */
    i18nScope?: string;
    /**
     * @remarks string icons have been deprecated, please pass a component from `@procore/core-icons`
     * @since 10.19.0
     */
    icon?: ButtonProps['icon'];
    /**
     * The button text.
     * @since 10.19.0
     */
    label?: string;
    /**
     * @since 10.19.0
     */
    loading?: ButtonProps['loading'];
    /**
     * Adds a search bar to the dropdown.
     * @since 10.19.0
     */
    onSearch?: (event: React.ChangeEvent<HTMLInputElement>) => void;
    /**
     * <div>
     *  <div>Callback for selecting an item from the menu
     *    <CodeBlock>
     *    { '({ event: ReactEvent, item: Menu.Item.props.item, group: bool }) => void' }
     *    </CodeBlock>
     *  </div>
     *  <div>
     *    <Code>item</Code> will be the <Code>item</Code> prop supplied to the{' '}
     *    <Code>Item</Code> component
     *  </div>
     * </div>
     * @since 10.19.0
     */
    onSelect?: (selection: Selection) => void;
    /**
     * The placement of the overlay.
     * @default 'bottom-left'
     * @since 10.19.0
     */
    placement?: DropdownPlacement;
    /**
     * If focus should return to the button after selection.
     * @ally Dropdowns hold no value and take an action. Focus is expected
     * to be moved from a Dropdown to something else, to continue the user flow .
     * If all actions are inert and does not move focus, set this to `true`.
     * If some actions are inert consider using `restoreFocus` on `Dropdown.Item`.
     * Closing Dropdown via `Escape` always restores focus.
     * @default false
     * @since 11.13.0
     */
    restoreFocusOnHide?: OverlayTriggerProps['restoreFocusOnHide'];
    /**
     * The button size
     * @default 'md'
     * @since 10.19.0
     */
    size?: ButtonProps['size'];
    /**
     * @since 10.19.0
     */
    trigger?: OverlayTriggerProps['trigger'];
    /**
     * @since 10.19.0
     */
    type?: ButtonProps['type'];
    /**
     * @default 'secondary'
     * @since 10.19.0
     */
    variant?: ButtonProps['variant'];
    /**
     * Whether to act as modal dialog.
     * Should be used when Dropdown has tabbable elements (e.g. buttons in footer).
     * @default 'false'
     * @since 11.5.0
     */
    hasTabbableElements?: boolean;
}
export interface DropdownButtonProps extends ButtonProps {
    /**
     * Shows the arrow when activated
     * @since 10.19.0
     */
    arrow?: boolean;
    /**
     * Shows the button spinner
     * @since 10.19.0
     */
    loading?: boolean;
    /**
     * Changes the direction of the arrow if shown
     * @since 10.19.0
     */
    open?: boolean;
    /**
     * @since 11.9.0
     * If the component should apply a focus appeareance. This is
     * not DOM focus management, and purely visual.
     */
    focus?: boolean | ((obj: {
        open: boolean;
    }) => boolean);
}
export interface DropdownMenuProps extends Omit<HTMLDivProps, 'onSelect'> {
    /**
     * @since 10.19.0
     */
    footer?: React.ReactNode;
    /**
     * @since 10.19.0
     */
    menuRef: React.RefObject<MenuRef>;
    /**
     * @since 10.19.0
     */
    i18nScope?: string;
    /**
     * @since 10.19.0
     */
    onSearch?: (event: React.ChangeEvent<HTMLInputElement>) => void;
    /**
     * @since 10.19.0
     */
    onSelect?: (selection: Selection) => void;
}
export interface ConsumerProps {
    /**
     * @since 10.19.0
     */
    children: (api: any) => JSX.Element;
}
export {};
