import { TemplateRef } from '@angular/core'; import { PassThroughOption, PassThrough, MenuItem } from 'primeng/api'; /** * Custom pass-through(pt) options. * @template I Type of instance. * * @see {@link Breadcrumb.pt} * @group Interface */ interface BreadcrumbPassThroughOptions { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption; /** * Used to pass attributes to the list's DOM element. */ list?: PassThroughOption; /** * Used to pass attributes to the home item's DOM element. */ homeItem?: PassThroughOption; /** * Used to pass attributes to the item's DOM element. */ item?: 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 separator's DOM element. */ separator?: PassThroughOption; /** * Used to pass attributes to the separator icon's DOM element. */ separatorIcon?: PassThroughOption; } /** * Defines valid pass-through options in Breadcrumb. * @see {@link BreadcrumbPassThroughOptions} * * @template I Type of instance. */ type BreadcrumbPassThrough = PassThrough>; /** * Defines clicked item event. * @see {@link BreadcrumbEmitsOptions.itemClick} */ interface BreadcrumbItemClickEvent { /** * Browser event. */ originalEvent: Event; /** * Clicked item instance. */ item: MenuItem; } /** * Custom item template context. * @group Interface */ interface BreadcrumbItemTemplateContext { /** * Menu item instance. */ $implicit: MenuItem; } /** * Defines valid templates in Breadcrumb. * @group Templates */ interface BreadcrumbTemplates { /** * Custom item template. * @param {Object} context - item data. */ item(context: BreadcrumbItemTemplateContext): TemplateRef; /** * Custom separator template. */ separator(): TemplateRef; } export type { BreadcrumbItemClickEvent, BreadcrumbItemTemplateContext, BreadcrumbPassThrough, BreadcrumbPassThroughOptions, BreadcrumbTemplates };