declare class ToolbarCommandRegistry { commands: ToolbarCommand[]; changeHandlers: Set<() => void>; constructor(); onChange(handler: () => void): () => void; emitChange(): void; register(command: ToolbarCommand): void; unregister(command: ToolbarCommand): void; } declare const getInternalRegistry: (useTopWindow?: boolean) => ToolbarCommandRegistry | undefined; type SelectHandler = () => void | boolean | Promise; type BadgeColor = 'amber' | 'blue' | 'pink' | 'purple' | 'red' | 'teal' | 'green' | 'gray'; interface ToolbarCommandConfig { /** The visible text for this command in the menu */ label: string; /** Text to show on a badge next to the label */ badge?: string; /** The color of the badge next to the label */ badgeColor?: BadgeColor; /** Alternative phrases that should match this command */ aliases?: string[]; /** A URL to open when this command is selected */ href?: string; /** A callback to run when this command is selected */ onSelect?: SelectHandler; /** Whether this command is currently visible (defaults to true) */ visible?: boolean; } declare class ToolbarCommand implements ToolbarCommandConfig { key: string; _label: string; _badge?: string; _badgeColor?: BadgeColor; _aliases?: string[]; _href?: string; onSelect?: SelectHandler; _visible?: boolean; changeHandlers: Set<() => void>; constructor(options: ToolbarCommandConfig); get label(): string; set label(value: string); get badge(): string | undefined; set badge(value: string | undefined); get badgeColor(): BadgeColor | undefined; set badgeColor(value: BadgeColor | undefined); get aliases(): string[] | undefined; set aliases(value: string[] | undefined); get href(): string | undefined; set href(value: string | undefined); get visible(): boolean | undefined; set visible(value: boolean | undefined); remove(): void; onChange(handler: () => void): () => void; emitChange(): void; } type VercelToolbarCommand = InstanceType; declare const createCommand: (options: ToolbarCommandConfig) => ToolbarCommand; export { ToolbarCommandConfig, VercelToolbarCommand, createCommand, getInternalRegistry };