import { default as React } from 'react'; /** An entry in a {@link ContextMenu}. */ export interface IContextMenuItem { /** Label shown for the entry. */ label: string; /** Optional element rendered before the label, e.g. ``. */ icon?: React.ReactNode; /** Runs on click. The menu closes afterwards. */ onClick: () => void; /** Draw a separator above this entry. */ divider?: boolean; /** Render the entry greyed out and non-interactive. */ disabled?: boolean; } export interface ContextMenuProps { /** Viewport x coordinate, typically `event.clientX`. */ x: number; /** Viewport y coordinate, typically `event.clientY`. */ y: number; /** Entries to show, in order. */ items: IContextMenuItem[]; /** Called on outside click, on Escape, and after any entry is chosen. */ onClose: () => void; /** Extra classes merged onto the menu surface. */ className?: string; } /** * A floating menu positioned at viewport coordinates, for right-click menus. * * Renders `position: fixed` at the given point and closes on outside click or * Escape. It does not decide when to appear — mount it conditionally from your * own `onContextMenu` handler and store the coordinates yourself. * * @example * ```tsx * {menu && ( * remove(menu.id) }]} * onClose={() => setMenu(null)} * /> * )} * ``` */ export declare const ContextMenu: ({ x, y, items, onClose, className }: ContextMenuProps) => import("react/jsx-runtime").JSX.Element;