import { CSSProperties, KeyboardEvent, RefObject } from 'react';
import { SelectItem, SectionMeta } from '../../../../internal/types/selectFieldInternalTypes';
import { OptionsPanelHandle } from '../../../../internal/components/OptionsPanel';
export type UseMenuInteractionConfig = {
    items: SelectItem[];
    sectionsMeta: SectionMeta[];
    onItemActivate: (item: SelectItem) => void;
    selectedItemIds: Set<string | number>;
    displayAs: "popover" | "dialog";
    closeOnActivate: boolean;
    disabled?: boolean;
    id: string;
    triggerRef: RefObject<HTMLButtonElement>;
    label: string;
    onImplicitClose?: () => void;
    onExplicitClose?: () => void;
};
export type MenuTriggerProps = {
    ref: RefObject<HTMLButtonElement>;
    onClick: () => void;
    onKeyDown: (e: KeyboardEvent) => void;
    "aria-haspopup": "listbox";
    "aria-controls": string;
    "aria-expanded": boolean;
    "data-state": "open" | "close";
};
type MenuPropsArg = {
    className?: string;
    style?: CSSProperties;
};
type MenuReturnProps = MenuPropsArg & {
    role: "listbox";
    id: string;
    "aria-label": string;
    "aria-labelledby"?: string;
    tabIndex?: number;
    "aria-activedescendant"?: string;
    ref: RefObject<HTMLDivElement>;
    onKeyDown: (e: KeyboardEvent) => void;
};
type ItemPropsArg = {
    item: SelectItem;
    index: number;
    className?: string;
    "data-type"?: string;
};
type ItemReturnProps = {
    role: "option";
    id: string;
    "aria-selected": boolean;
    "aria-disabled"?: boolean;
    onClick: () => void;
    onMouseMove: () => void;
    className?: string;
    "data-type"?: string;
};
export type GetMenuPropsFn = (opts?: MenuPropsArg) => MenuReturnProps;
export type GetItemPropsFn = (opts: ItemPropsArg) => ItemReturnProps;
export declare const useMenuInteraction: ({ items, sectionsMeta: _sectionsMeta, onItemActivate, selectedItemIds, displayAs: _displayAs, closeOnActivate, disabled, id, triggerRef, label, onImplicitClose, onExplicitClose, }: UseMenuInteractionConfig) => {
    isOpen: boolean;
    openMenu: () => void;
    closeMenu: (options?: {
        restoreFocus?: boolean;
    }) => void;
    highlightedIndex: number;
    setHighlightedIndex: import('react').Dispatch<import('react').SetStateAction<number>>;
    getTriggerProps: () => MenuTriggerProps;
    getMenuProps: GetMenuPropsFn;
    getItemProps: GetItemPropsFn;
    listRef: RefObject<OptionsPanelHandle>;
    menuContainerRef: RefObject<HTMLDivElement>;
    handleKeyDown: (e: KeyboardEvent) => void;
};
export {};
