import { SchemaType } from './parts/Schema'; import { Intent } from './Intent'; import { Partial } from './Partial'; import { SortItem, Ordering } from './Sort'; import { SerializeOptions, Serializable, SerializePath } from './StructureNodes'; import { FixMe } from './types'; export declare function maybeSerializeMenuItem(item: MenuItem | MenuItemBuilder, index: number, path: SerializePath): MenuItem; /** * @deprecated * * this option is unused. provide `true` instead of an object */ declare type ShowAsAction = { /** * @deprecated * * this option is unused. provide `true` instead of an object */ whenCollapsed: boolean; }; declare type ActionType = string | ((params: Record | undefined, scope?: any) => void); declare type ParamsType = Record; export interface MenuItem { title: string; action?: ActionType; intent?: Intent; group?: string; icon?: FixMe; params?: ParamsType; showAsAction?: boolean; } export declare type PartialMenuItem = Partial; export declare class MenuItemBuilder implements Serializable { protected spec: PartialMenuItem; constructor(spec?: MenuItem); action(action: ActionType): MenuItemBuilder; getAction(): ActionType | undefined; intent(intent: Intent): MenuItemBuilder; getIntent(): Intent | undefined; title(title: string): MenuItemBuilder; getTitle(): string | undefined; group(group: string): MenuItemBuilder; getGroup(): string | undefined; icon(icon: FixMe): MenuItemBuilder; getIcon(): Function | undefined; params(params: ParamsType): MenuItemBuilder; getParams(): ParamsType | undefined; showAsAction(showAsAction?: boolean | ShowAsAction): MenuItemBuilder; getShowAsAction(): boolean | undefined; serialize(options?: SerializeOptions): MenuItem; clone(withSpec?: PartialMenuItem): MenuItemBuilder; } export interface SortMenuItem extends MenuItem { params: { by: SortItem[]; }; } export declare function getOrderingMenuItem(ordering: Ordering, extendedProjection?: string): MenuItemBuilder; export declare function getOrderingMenuItemsForSchemaType(typeName: SchemaType | string): MenuItemBuilder[]; export {}; //# sourceMappingURL=MenuItem.d.ts.map