import type { MouseEvent, RefObject } from "react";
import type { InitialCoords, PositionAnchor } from "../positioning/types.js";
import type { UseStateObject } from "../types.js";
/** @since 6.0.0 */
export interface ContextMenuProps extends InitialCoords {
    "aria-label": string;
    anchor: PositionAnchor;
    fixedTo: RefObject<HTMLElement>;
    visible: boolean;
    preventScroll: boolean;
    onRequestClose(): void;
}
/**
 * @since 5.0.0
 * @since 6.0.0  Dropped most options since they are no longer required for the
 * context menu to work. Apply any `Menu` props directly to the `Menu` component
 * instead.
 */
export interface ContextMenuHookOptions {
    /**
     * @defaultValue `BELOW_INNER_LEFT_ANCHOR`
     * @see {@link BELOW_INNER_LEFT_ANCHOR}
     */
    anchor?: PositionAnchor;
    /**
     * @defaultValue `"Context Menu"`
     */
    menuLabel?: string;
    /**
     * @defaultValue `true`
     */
    preventScroll?: boolean;
    onContextMenu?<E extends HTMLElement>(event: MouseEvent<E>): void;
}
/**
 * @since 5.0.0
 * @since 6.0.0 Renamed from `ContextMenuHookReturnValue` to
 * `ContextMenuImplementation` and dropped the `menuRef` and `menuNodeRef`
 * fields.
 */
export interface ContextMenuImplementation extends UseStateObject<"visible", boolean> {
    menuProps: ContextMenuProps;
    onContextMenu<E extends HTMLElement>(event: MouseEvent<E>): void;
}
/**
 * This hook controls the visibility and positioning for a context menu.
 *
 * @example Simple Example
 * ```tsx
 * import type { ReactElement } from "react";
 * import [ Menu, MenuItem, useContextMenu ] from "@react-md/core":
 *
 * function Example(): ReactElement {
 *   const { menuProps, onContextMenu } = useContextMenu();
 *
 *   return (
 *     <>
 *       <textarea onContextMenu={onContextMenu} />
 *       <Menu {...menuProps}>
 *         <MenuItem>Cut</MenuItem>
 *         <MenuItem>Copy</MenuItem>
 *         <MenuItem>Paste</MenuItem>
 *         <MenuItem>Undo</MenuItem>
 *       </Menu>
 *     </>
 *   );
 * }
 * ```
 *
 * @since 5.0.0
 * @since 6.0.0 No longer supports overriding most of the `Menu` props. The
 * props must be passed to the `Menu` component manually.
 */
export declare function useContextMenu(options?: ContextMenuHookOptions): ContextMenuImplementation;
