import { TemplateRef } from '@angular/core'; import { PassThroughOption, PassThrough, MenuItem } from 'primeng/api'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link MegaMenu.pt} * @group Interface */ interface MegaMenuPassThroughOptions { /** * 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 button's DOM element. */ button?: PassThroughOption; /** * Used to pass attributes to the button icon's DOM element. */ buttonIcon?: PassThroughOption; /** * Used to pass attributes to the root list's DOM element. */ rootList?: 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 submenu icon's DOM element. */ submenuIcon?: PassThroughOption; /** * Used to pass attributes to the overlay's DOM element. */ overlay?: PassThroughOption; /** * Used to pass attributes to the grid's DOM element. */ grid?: PassThroughOption; /** * Used to pass attributes to the column's DOM element. */ column?: PassThroughOption; /** * Used to pass attributes to the submenu's DOM element. */ submenu?: PassThroughOption; /** * Used to pass attributes to the end's DOM element. */ end?: PassThroughOption; } /** * Defines valid pass-through options in MegaMenu. * @see {@link MegaMenuPassThroughOptions} * * @template I Type of instance. */ type MegaMenuPassThrough = PassThrough>; /** * Custom item template context. * @group Interface */ interface MegaMenuItemTemplateContext { /** * Menu item instance. */ $implicit: MenuItem; } /** * Defines valid templates in MegaMenu. * @group Templates */ interface MegaMenuTemplates { /** * Custom item template. * @param {Object} context - item context. */ item(context: MegaMenuItemTemplateContext): TemplateRef; /** * Custom template of start. */ start(): TemplateRef; /** * Custom template of end. */ end(): TemplateRef; /** * Custom template of submenu icon. */ submenuicon(): TemplateRef; /** * Custom menu button template on responsive mode. */ button(): TemplateRef; /** * Custom menu button icon template on responsive mode. */ buttonicon(): TemplateRef; /** * Custom menu icon template. */ menuicon(): TemplateRef; } export type { MegaMenuItemTemplateContext, MegaMenuPassThrough, MegaMenuPassThroughOptions, MegaMenuTemplates };