import { TemplateRef } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; import { PassThroughOption, PassThrough, MenuItem } from 'primeng/api'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Menu.pt} * @group Interface */ interface MenuPassThroughOptions { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the start's DOM element. */ start?: PassThroughOption; /** * Used to pass attributes to the list's DOM element. */ list?: PassThroughOption; /** * Used to pass attributes to the submenu label's DOM element. */ submenuLabel?: PassThroughOption; /** * Used to pass attributes to the separator's DOM element. */ separator?: PassThroughOption; /** * Used to pass attributes to the item's DOM element. */ item?: PassThroughOption; /** * Used to pass attributes to the item content's DOM element. */ itemContent?: PassThroughOption; /** * Used to pass attributes to the item link's DOM element. */ itemLink?: PassThroughOption; /** * Used to pass attributes to the item icon's DOM element. */ itemIcon?: PassThroughOption; /** * Used to pass attributes to the item label's DOM element. */ itemLabel?: PassThroughOption; /** * Used to pass attributes to the end's DOM element. */ end?: PassThroughOption; /** * Used to pass options to the motion component/directive. */ motion?: MotionOptions; } /** * Defines valid pass-through options in Menu. * @see {@link MenuPassThroughOptions} * * @template I Type of instance. */ type MenuPassThrough = PassThrough>; /** * Custom item template context. * @group Interface */ interface MenuItemTemplateContext { /** * Menu item instance. */ $implicit: MenuItem; } /** * Custom submenu header template context. * @group Interface */ interface MenuSubmenuHeaderTemplateContext { /** * Submenu item instance. */ $implicit: MenuItem; } /** * Defines valid templates in Menu. * @group Templates */ interface MenuTemplates { /** * Custom template of start. */ start(): TemplateRef; /** * Custom template of end. */ end(): TemplateRef; /** * Custom template of item. * @param {Object} context - item context. */ item(context: MenuItemTemplateContext): TemplateRef; /** * Custom template of submenu header. * @param {Object} context - submenu header context. */ submenuheader(context: MenuSubmenuHeaderTemplateContext): TemplateRef; } export type { MenuItemTemplateContext, MenuPassThrough, MenuPassThroughOptions, MenuSubmenuHeaderTemplateContext, MenuTemplates };