import { ReactNode } from "react"; //#region src/components/context-menu.d.ts export type ContextMenuAction = { label: string; icon?: ReactNode; onClick?: () => void; variant?: "default" | "destructive"; disabled?: boolean; /** Set on a toggle-style action: it renders as a checkbox item whose * state assistive technology can read. `onClick` flips it. */ checked?: boolean; submenu?: readonly ContextMenuAction[]; /** Draw a divider above this item — e.g. to set a trailing "New …" action * apart from the list of existing choices above it. */ separatorBefore?: boolean; /** Keep the menu open after the click, for a toggle the user may flip * several of in a row. */ closeOnClick?: boolean; }; export type ContextMenuProps = { actions: readonly ContextMenuAction[]; children: ReactNode; }; /** * Wrap arbitrary content with a right-click context menu. Built on * base-ui's `ContextMenu`, which is purpose-built for right-click / * long-press triggers — it tracks the cursor anchor itself and uses * dismissal semantics tuned for context menus, so the popup doesn't * close on incidental pointer movement the way a hover/click `Menu` * does. * * Renders only the children when `actions` is empty so callers can * pass conditionally. */ export declare const ContextMenu: ({ actions, children }: ContextMenuProps) => ReactNode; //#endregion