{"version":3,"file":"primeng-breadcrumb.mjs","sources":["../../src/app/components/breadcrumb/breadcrumb.ts","../../src/app/components/breadcrumb/primeng-breadcrumb.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, ContentChildren, EventEmitter, Input, NgModule, Output, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { Router, RouterModule } from '@angular/router';\nimport { MenuItem, PrimeTemplate, SharedModule } from 'primeng/api';\nimport { ChevronRightIcon } from 'primeng/icons/chevronright';\nimport { HomeIcon } from 'primeng/icons/home';\nimport { TooltipModule } from 'primeng/tooltip';\nimport { BreadcrumbItemClickEvent } from './breadcrumb.interface';\n/**\n * Breadcrumb provides contextual information about page hierarchy.\n * @group Components\n */\n@Component({\n selector: 'p-breadcrumb',\n template: `\n \n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./breadcrumb.css'],\n host: {\n class: 'p-element'\n }\n})\nexport class Breadcrumb implements AfterContentInit {\n /**\n * An array of menuitems.\n * @group Props\n */\n @Input() model: MenuItem[] | undefined;\n /**\n * Inline style of the component.\n * @group Props\n */\n @Input() style: { [klass: string]: any } | null | undefined;\n /**\n * Style class of the component.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * MenuItem configuration for the home icon.\n * @group Props\n */\n @Input() home: MenuItem | undefined;\n /**\n * Defines a string that labels the home icon for accessibility.\n * @group Props\n */\n @Input() homeAriaLabel: string | undefined;\n /**\n * Fired when an item is selected.\n * @param {BreadcrumbItemClickEvent} event - custom click event.\n * @group Emits\n */\n @Output() onItemClick: EventEmitter = new EventEmitter();\n\n @ContentChildren(PrimeTemplate) templates: QueryList | undefined;\n\n separatorTemplate: TemplateRef | undefined;\n\n itemTemplate: TemplateRef | undefined;\n\n constructor(private router: Router) {}\n\n onClick(event: MouseEvent, item: MenuItem) {\n if (item.disabled) {\n event.preventDefault();\n return;\n }\n\n if (!item.url && !item.routerLink) {\n event.preventDefault();\n }\n\n if (item.command) {\n item.command({\n originalEvent: event,\n item: item\n });\n }\n\n this.onItemClick.emit({\n originalEvent: event,\n item: item\n });\n }\n\n onHomeClick(event: MouseEvent | any) {\n if (this.home) {\n this.onClick(event, this.home);\n }\n }\n\n ngAfterContentInit() {\n this.templates?.forEach((item) => {\n switch (item.getType()) {\n case 'separator':\n this.separatorTemplate = item.template;\n break;\n\n case 'item':\n this.itemTemplate = item.template;\n break;\n\n default:\n this.itemTemplate = item.template;\n break;\n }\n });\n }\n\n isCurrentUrl(item) {\n const { routerLink } = item;\n const lastPath = this.router ? this.router.url : '';\n\n return routerLink === lastPath ? 'page' : undefined;\n }\n}\n\n@NgModule({\n imports: [CommonModule, RouterModule, TooltipModule, ChevronRightIcon, HomeIcon, SharedModule],\n exports: [Breadcrumb, RouterModule, TooltipModule, SharedModule],\n declarations: [Breadcrumb]\n})\nexport class BreadcrumbModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAQA;;;AAGG;MAuIU,UAAU,CAAA;AAuCC,IAAA,MAAA,CAAA;AAtCpB;;;AAGG;AACM,IAAA,KAAK,CAAyB;AACvC;;;AAGG;AACM,IAAA,KAAK,CAA8C;AAC5D;;;AAGG;AACM,IAAA,UAAU,CAAqB;AACxC;;;AAGG;AACM,IAAA,IAAI,CAAuB;AACpC;;;AAGG;AACM,IAAA,aAAa,CAAqB;AAC3C;;;;AAIG;AACO,IAAA,WAAW,GAA2C,IAAI,YAAY,EAA4B,CAAC;AAE7E,IAAA,SAAS,CAAuC;AAEhF,IAAA,iBAAiB,CAA+B;AAEhD,IAAA,YAAY,CAA+B;AAE3C,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;KAAI;IAEtC,OAAO,CAAC,KAAiB,EAAE,IAAc,EAAA;QACrC,IAAI,IAAI,CAAC,QAAQ,EAA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