{"version":3,"file":"igniteui-angular-navbar.mjs","names":[],"sources":["../../../projects/igniteui-angular/navbar/src/navbar/navbar.component.ts","../../../projects/igniteui-angular/navbar/src/navbar/navbar.component.html","../../../projects/igniteui-angular/navbar/src/navbar/public_api.ts","../../../projects/igniteui-angular/navbar/src/navbar/navbar.module.ts"],"sourcesContent":["import {\n    Component,\n    EventEmitter,\n    HostBinding,\n    Input,\n    Output,\n    Directive,\n    ContentChild,\n    booleanAttribute,\n    ChangeDetectionStrategy,\n    ViewEncapsulation\n} from '@angular/core';\n\nimport { IgxIconComponent } from 'igniteui-angular/icon';\nimport { IgxNoTypographyDirective } from 'igniteui-angular/directives';\n\n/**\n * Action icon is a container for the action nav icon of the navbar.\n */\n@Directive({\n    selector: '[igxNavbarAction],igx-navbar-action',\n    standalone: true\n})\nexport class IgxNavbarActionDirective { }\n\n@Directive({\n    selector: '[igxNavbarTitle],igx-navbar-title',\n    standalone: true,\n    hostDirectives: [IgxNoTypographyDirective]\n})\nexport class IgxNavbarTitleDirective { }\n\nlet NEXT_ID = 0;\n/**\n * **Ignite UI for Angular Navbar** -\n * [Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/navbar.html)\n *\n * The Ignite UI Navbar is most commonly used to provide an app header with a hamburger menu and navigation\n * state such as a \"Go Back\" button. It also supports other actions represented by icons.\n *\n * Example:\n * ```html\n * <igx-navbar title=\"Sample App\" actionButtonIcon=\"menu\">\n *   <igx-icon>search</igx-icon>\n *   <igx-icon>favorite</igx-icon>\n *   <igx-icon>more_vert</igx-icon>\n * </igx-navbar>\n * ```\n */\n\n@Component({\n    selector: 'igx-navbar',\n    templateUrl: 'navbar.component.html',\n    styleUrl: 'navbar.component.css',\n    encapsulation: ViewEncapsulation.None,\n    changeDetection: ChangeDetectionStrategy.Eager,\n    imports: [IgxIconComponent]\n})\n\nexport class IgxNavbarComponent {\n    /**\n     * Sets the value of the `id` attribute. If not provided it will be automatically generated.\n     * ```html\n     * <igx-navbar [id]=\"'igx-navbar-12'\" title=\"Sample App\" actionButtonIcon=\"menu\">\n     * ```\n     */\n    @HostBinding('attr.id')\n    @Input()\n    public id = `igx-navbar-${NEXT_ID++}`;\n\n    /**\n     * @hidden\n     * @internal\n     */\n    @HostBinding('class.igx-navbar')\n    public cssClass = 'igx-navbar';\n\n\n    /**\n     * Sets the icon of the navbar.\n     * ```html\n     * <igx-navbar [title]=\"currentView\" actionButtonIcon=\"arrow_back\"></igx-navbar>\n     * ```\n     */\n    @Input() public actionButtonIcon!: string;\n\n    /**\n     * Sets the title of the navbar.\n     * ```html\n     * <igx-navbar title=\"Sample App\" actionButtonIcon=\"menu\">\n     * ```\n     */\n    @Input() public title!: string;\n\n    /**\n     * The event that will be thrown when the action is executed,\n     * provides reference to the navbar component as argument\n     * ```typescript\n     * public actionExc(event){\n     *     alert(\"Action Execute!\");\n     * }\n     *  //..\n     * ```\n     * ```html\n     * <igx-navbar (action)=\"actionExc($event)\" title=\"Sample App\" actionButtonIcon=\"menu\">\n     * ```\n     */\n    @Output() public action = new EventEmitter<IgxNavbarComponent>();\n\n    /**\n     * Sets the titleId of the navbar. If not set it will be automatically generated.\n     * ```html\n     * <igx-navbar [titleId]=\"'igx-navbar-7'\" title=\"Sample App\" actionButtonIcon=\"menu\">\n     * ```\n     */\n    @Input()\n    public titleId = `igx-navbar-title-${NEXT_ID++}`;\n\n    /**\n     * @hidden\n     */\n    @ContentChild(IgxNavbarActionDirective, { read: IgxNavbarActionDirective })\n    protected actionIconTemplate!: IgxNavbarActionDirective;\n\n    /**\n     * @hidden\n     */\n    @ContentChild(IgxNavbarTitleDirective, { read: IgxNavbarTitleDirective })\n    protected titleContent!: IgxNavbarTitleDirective;\n\n    private isVisible = true;\n\n    /**\n     * Sets whether the action button of the navbar is visible.\n     * ```html\n     * <igx-navbar [title]=\"currentView\" [isActionButtonVisible]=\"'false'\"></igx-navbar>\n     * ```\n     */\n    public set isActionButtonVisible(value: boolean) {\n        this.isVisible = value;\n    }\n\n    /**\n     * Returns whether the navbar action button is visible, true/false.\n     * ```typescript\n     *  @ViewChild(\"MyChild\")\n     * public navBar: IgxNavbarComponent;\n     * ngAfterViewInit(){\n     *     let actionButtonVisibile = this.navBar.isActionButtonVisible;\n     * }\n     * ```\n     */\n    @Input({ transform: booleanAttribute })\n    public get isActionButtonVisible(): boolean {\n        if (this.actionIconTemplate || !this.actionButtonIcon) {\n            return false;\n        }\n        return this.isVisible;\n    }\n\n    public get isTitleContentVisible(): boolean {\n        return this.titleContent ? true : false;\n    }\n\n    /**\n     * @hidden\n     */\n    public _triggerAction() {\n        this.action.emit(this);\n    }\n}\n\n","<nav role=\"navigation\" [attr.aria-labelledby]=\"titleId\">\n    <div class=\"igx-navbar__left\">\n        @if (isActionButtonVisible) {\n            <igx-icon (click)=\"_triggerAction()\">\n                {{actionButtonIcon}}\n            </igx-icon>\n        }\n        <ng-content select=\"igx-navbar-action, [igxNavbarAction]\"></ng-content>\n    </div>\n    <div class=\"igx-navbar__middle\">\n        @if (!isTitleContentVisible) {\n            <h1\n                class=\"igx-navbar__title\"\n                data-no-typography\n                [attr.id]=\"titleId\">\n                {{ title }}\n            </h1>\n        }\n        <ng-content select=\"igx-navbar-title, [igxNavbarTitle]\"></ng-content>\n    </div>\n    <div class=\"igx-navbar__right\">\n        <ng-content></ng-content>\n    </div>\n</nav>\n","import { IgxNavbarActionDirective, IgxNavbarComponent, IgxNavbarTitleDirective } from './navbar.component';\n\nexport * from './navbar.component';\n\n/* NOTE: Navbar directives collection for ease-of-use import in standalone components scenario */\nexport const IGX_NAVBAR_DIRECTIVES = [\n    IgxNavbarComponent,\n    IgxNavbarActionDirective,\n    IgxNavbarTitleDirective\n] as const;\n","import { NgModule } from '@angular/core';\nimport { IGX_NAVBAR_DIRECTIVES } from './public_api';\n\n/**\n * @hidden\n * IMPORTANT: The following is NgModule exported for backwards-compatibility before standalone components\n */\n@NgModule({\n    imports: [\n        ...IGX_NAVBAR_DIRECTIVES\n    ],\n    exports: [\n        ...IGX_NAV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