import * as react from 'react';
import { ActionItem } from './action-row.js';
interface CommandGroup {
/** Group label (e.g. "Servers", "Actions") */
label: string;
/** Items in this group */
items: ActionItem[];
}
interface CommandMenuProps {
/** Whether the menu is open */
open: boolean;
/** Called when menu should close */
onOpenChange: (open: boolean) => void;
/** Command groups to display */
groups: CommandGroup[];
/** Placeholder text for the search input */
placeholder?: string;
/** Empty state message when no results */
emptyMessage?: string;
/** Custom class for the overlay */
className?: string;
/** Keyboard shortcut to toggle (default: "⌘K") */
toggleShortcut?: string;
/** Custom search filter override. Return filtered groups. */
filter?: (query: string, groups: CommandGroup[]) => CommandGroup[];
/** Callback when an action runs */
onAction?: (action: ActionItem) => void;
}
/**
* Command palette — a Raycast-inspired global command menu.
*
* ```tsx
* const [open, setOpen] = useState(false)
*
* , onSelect: () => {} },
* ],
* },
* ]}
* />
* ```
*/
declare const CommandMenu: react.ForwardRefExoticComponent>;
export { type CommandGroup, CommandMenu, type CommandMenuProps };