import { TemplateRef } from '@angular/core'; import { MotionOptions } from '@primeuix/motion'; import { PassThroughOption, PassThrough } from 'primeng/api'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link TieredMenu.pt} * @group Interface */ interface TieredMenuPassThroughOptions { /** * 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 submenu's DOM element. */ submenu?: 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 options to the motion component/directive. */ motion?: MotionOptions; } /** * Defines valid pass-through options in TieredMenu. * @see {@link TieredMenuPassThroughOptions} * * @template I Type of instance. */ type TieredMenuPassThrough = PassThrough>; /** * Custom item template context. * @group Interface */ interface TieredMenuItemTemplateContext { /** * Item instance. */ $implicit: any; /** * Whether the item has a submenu. */ hasSubmenu: boolean; } /** * Defines valid templates in TieredMenu. * @group Templates */ interface TieredMenuTemplates { /** * Custom item template. * @param {TieredMenuItemTemplateContext} context - item context. */ item(context: TieredMenuItemTemplateContext): TemplateRef; /** * Custom submenu icon template. */ submenuicon(): TemplateRef; } export type { TieredMenuItemTemplateContext, TieredMenuPassThrough, TieredMenuPassThroughOptions, TieredMenuTemplates };