Files
dees-catalog/ts_web/elements/interfaces/appbarmenuitem.ts

34 lines
815 B
TypeScript
Raw Normal View History

import * as plugins from '../00plugins.js';
/**
* Divider menu item
*/
export interface IAppBarMenuDivider {
divider: true;
}
/**
* Regular menu item
*/
export interface IAppBarMenuItemRegular extends plugins.tsclass.website.IMenuItem {
id?: string;
shortcut?: string; // e.g., "Cmd+S" or "Ctrl+S"
submenu?: IAppBarMenuItem[];
disabled?: boolean;
checked?: boolean; // For checkbox menu items
radioGroup?: string; // For radio button menu items
}
/**
* Extended menu item interface for app bar menus
* Can be either a regular menu item or a divider
*/
export type IAppBarMenuItem = IAppBarMenuItemRegular | IAppBarMenuDivider;
/**
* Interface for the menu bar configuration
*/
export interface IMenuBar {
menuItems: IAppBarMenuItem[];
onMenuSelect?: (item: IAppBarMenuItem) => void;
}