import { Component, forwardRef, Input, TemplateRef } from '@angular/core';
import { BreadCrumbService } from './breadcrumb.service';
import { BREADCRUMB } from './breadcrumb.token';
import * as i0 from "@angular/core";
import * as i1 from "./breadcrumb.service";
import * as i2 from "@angular/common";
import * as i3 from "./breadcrumb-item/breadcrumb-item.component";
export class BreadCrumbComponent {
    constructor(breadCrumbService) {
        this.breadCrumbService = breadCrumbService;
        this.source = [];
    }
    navigateTo($event, item) {
        this.breadCrumbService.navigateTo($event, item);
    }
}
BreadCrumbComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BreadCrumbComponent, deps: [{ token: i1.BreadCrumbService }], target: i0.ɵɵFactoryTarget.Component });
BreadCrumbComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: BreadCrumbComponent, selector: "d-breadcrumb", inputs: { separatorIcon: "separatorIcon", source: "source" }, providers: [{
            provide: BREADCRUMB,
            useExisting: forwardRef(() => BreadCrumbComponent)
        }], exportAs: ["dBreadcrumb"], ngImport: i0, template: "<ng-container *ngIf=\"source && source.length\">\n  <d-breadcrumb-item\n    *ngFor=\"let item of source\"\n    [showMenu]=\"item.showMenu\"\n    [isSearch]=\"item.isSearch\"\n    [menuList]=\"item.menuList\"\n    [customMenuTemplate]=\"item.customMenuTemplate\"\n  >\n    <a\n      *ngIf=\"!item.noNavigation && (!item.linkType || item.linkType === 'hrefLink')\"\n      rel=\"noopener\"\n      [href]=\"item.link\"\n      [target]=\"item.target ? item.target : '_self'\"\n      >{{ item.title }}</a\n    >\n    <a\n      *ngIf=\"!item.noNavigation && item.linkType === 'routerLink'\"\n      rel=\"noopener\"\n      [target]=\"item.target\"\n      [href]=\"item.link\"\n      (click)=\"navigateTo($event, item)\"\n      >{{ item.title }}</a\n    >\n    <span *ngIf=\"item.noNavigation\">{{ item.title }}</span>\n  </d-breadcrumb-item>\n</ng-container>\n<ng-container *ngIf=\"!(source && source.length)\">\n  <ng-content></ng-content>\n</ng-container>\n", styles: [":host{display:flex;-webkit-align-items:center;min-height:28px}:host ::ng-deep d-breadcrumb-item:last-child .devui-breadcrumb-item{color:#252b3a;color:var(--devui-text, #252b3a)}:host ::ng-deep d-breadcrumb-item:last-child .devui-breadcrumb-item a{color:#252b3a;color:var(--devui-text, #252b3a)}:host ::ng-deep d-breadcrumb-item:last-child .devui-breadcrumb-separator{display:none}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.BreadCrumbItemComponent, selector: "d-breadcrumb-item", inputs: ["showMenu", "customMenuTemplate", "menuList", "isSearch"], outputs: ["toggleEvent"], exportAs: ["dBreadcrumbItem"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: BreadCrumbComponent, decorators: [{
            type: Component,
            args: [{ selector: 'd-breadcrumb', exportAs: 'dBreadcrumb', preserveWhitespaces: false, providers: [{
                            provide: BREADCRUMB,
                            useExisting: forwardRef(() => BreadCrumbComponent)
                        }], template: "<ng-container *ngIf=\"source && source.length\">\n  <d-breadcrumb-item\n    *ngFor=\"let item of source\"\n    [showMenu]=\"item.showMenu\"\n    [isSearch]=\"item.isSearch\"\n    [menuList]=\"item.menuList\"\n    [customMenuTemplate]=\"item.customMenuTemplate\"\n  >\n    <a\n      *ngIf=\"!item.noNavigation && (!item.linkType || item.linkType === 'hrefLink')\"\n      rel=\"noopener\"\n      [href]=\"item.link\"\n      [target]=\"item.target ? item.target : '_self'\"\n      >{{ item.title }}</a\n    >\n    <a\n      *ngIf=\"!item.noNavigation && item.linkType === 'routerLink'\"\n      rel=\"noopener\"\n      [target]=\"item.target\"\n      [href]=\"item.link\"\n      (click)=\"navigateTo($event, item)\"\n      >{{ item.title }}</a\n    >\n    <span *ngIf=\"item.noNavigation\">{{ item.title }}</span>\n  </d-breadcrumb-item>\n</ng-container>\n<ng-container *ngIf=\"!(source && source.length)\">\n  <ng-content></ng-content>\n</ng-container>\n", styles: [":host{display:flex;-webkit-align-items:center;min-height:28px}:host ::ng-deep d-breadcrumb-item:last-child .devui-breadcrumb-item{color:#252b3a;color:var(--devui-text, #252b3a)}:host ::ng-deep d-breadcrumb-item:last-child .devui-breadcrumb-item a{color:#252b3a;color:var(--devui-text, #252b3a)}:host ::ng-deep d-breadcrumb-item:last-child .devui-breadcrumb-separator{display:none}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.BreadCrumbService }]; }, propDecorators: { separatorIcon: [{
                type: Input
            }], source: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJlYWRjcnVtYi5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9kZXZ1aS9icmVhZGNydW1iL2JyZWFkY3J1bWIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vZGV2dWkvYnJlYWRjcnVtYi9icmVhZGNydW1iLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBRSxXQUFXLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUUsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDekQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLG9CQUFvQixDQUFDOzs7OztBQWNoRCxNQUFNLE9BQU8sbUJBQW1CO0lBRzlCLFlBQW9CLGlCQUFvQztRQUFwQyxzQkFBaUIsR0FBakIsaUJBQWlCLENBQW1CO1FBRC9DLFdBQU0sR0FBd0IsRUFBRSxDQUFDO0lBQ2tCLENBQUM7SUFDN0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