import { TemplateRef } from '@angular/core'; import { PassThroughOption, PassThrough, MenuItem } from 'primeng/api'; import { BadgePassThrough } from 'primeng/types/badge'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Menubar.pt} * @group Interface */ interface MenubarPassThroughOptions { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the root list's DOM element. */ rootList?: 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 separator's DOM element. */ separator?: PassThroughOption; /** * Used to pass attributes to the mobile menu button's DOM element. */ button?: PassThroughOption; /** * Used to pass attributes to the mobile menu button icon's DOM element. */ buttonIcon?: PassThroughOption; /** * Used to pass attributes to the submenu's DOM element. */ submenu?: PassThroughOption; /** * Used to pass attributes to the start of the component. */ start?: PassThroughOption; /** * Used to pass attributes to the end of the component. */ end?: PassThroughOption; /** * Used to pass attributes to Badge component. * @see {@link BadgePassThrough} */ pcBadge?: BadgePassThrough; } /** * Defines valid pass-through options in Menubar. * @see {@link MenubarPassThroughOptions} * * @template I Type of instance. */ type MenubarPassThrough = PassThrough>; /** * Custom item template context. * @group Interface */ interface MenubarItemTemplateContext { /** * Menu item instance. */ $implicit: MenuItem; /** * Whether the item is at the root level. */ root: boolean; } /** * Defines valid templates in Menubar. * @group Templates */ interface MenubarTemplates { /** * Custom item template. * @param {Object} context - item context. */ item(context: MenubarItemTemplateContext): TemplateRef; /** * Custom template of start. */ start(): TemplateRef; /** * Custom template of end. */ end(): TemplateRef; /** * Custom template of menu icon. */ menuicon(): TemplateRef; /** * Custom template of submenu icon. */ submenuicon(): TemplateRef; } export type { MenubarItemTemplateContext, MenubarPassThrough, MenubarPassThroughOptions, MenubarTemplates };