import { Component, Input } from '@angular/core';
import { SubMenuService } from './sub-menu.service';
import * as i0 from "@angular/core";
import * as i1 from "./sub-menu.service";
import * as i2 from "@angular/common";
import * as i3 from "@angular/router";
import * as i4 from "../pipes-directives/directives/dropdown/index";
export class SubMenuComponent {
    constructor(submenuService) {
        this.submenuService = submenuService;
        this.typeMenu = 'list';
        this.activeName = 'Select';
        this.newDataSubscription = this.submenuService.subMenu.subscribe((subscription) => this.processData(subscription));
    }
    processData(data) {
        setTimeout(() => (this.subMenuData = data), 10);
    }
    ngOnDestroy() {
        this.newDataSubscription.unsubscribe();
    }
}
SubMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SubMenuComponent, deps: [{ token: i1.SubMenuService }], target: i0.ɵɵFactoryTarget.Component });
SubMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SubMenuComponent, selector: "epom-sub-menu", inputs: { typeMenu: "typeMenu", activeName: "activeName" }, ngImport: i0, template: "<ul class=\"nav navbar-nav\" *ngIf=\"typeMenu === 'list'\">\n  <ng-container *ngFor=\"let item of subMenuData; let i = index\">\n    <li *ngIf=\"!item?.hidden\" routerLinkActive=\"active\" [routerLinkActiveOptions]=\"{exact:!item.exactTurnOff}\">\n      <a [routerLink]=\"item.path\" [queryParams]=\"item.queryParams\" *ngIf=\"item.path\">{{ item.name }} </a>\n      <i *ngIf=\"item.badge && item.badge > 0\">\n        <span class=\"bubble tabs-bubble\">{{ item.badge }}</span>\n      </i>\n      <span *ngIf=\"!item.path\">{{ item.name }}</span>\n    </li>\n  </ng-container>\n</ul>\n\n<div class=\"dropdown submenu-dropdown page-actions\" dropDown *ngIf=\"typeMenu === 'dropdown'\">\n  <button class=\"btn btn-default dropdown-toggle\" type=\"button\" id=\"dropdownMenu1\" data-toggle=\"dropdown\">\n    {{ activeName }}\n    <span class=\"caret\"></span>\n  </button>\n  <ul class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"dropdownMenu1\">\n    <li *ngFor=\"let item of subMenuData\" routerLinkActive=\"active\">\n      <a routerLinkActive=\"active\" [routerLink]=\"item.path\" *ngIf=\"item.path\">{{ item.name }}</a>\n      <span *ngIf=\"!item.path\">{{ item.name }}</span>\n    </li>\n  </ul>\n</div>\n", styles: [".nav-wrapper{width:100%}@media (min-width: 768px){.navbar-nav{float:none}}li{display:flex;gap:4px}li .bubble.tabs-bubble{font-style:normal;background-color:var(--error-default-color);color:var(--error-on-color);font-weight:var(--font-weight-semibold);position:relative;display:block;bottom:unset;right:unset}\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: "directive", type: i3.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i3.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: i4.DropdownDirective, selector: "[dropDown]" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SubMenuComponent, decorators: [{
            type: Component,
            args: [{ selector: 'epom-sub-menu', template: "<ul class=\"nav navbar-nav\" *ngIf=\"typeMenu === 'list'\">\n  <ng-container *ngFor=\"let item of subMenuData; let i = index\">\n    <li *ngIf=\"!item?.hidden\" routerLinkActive=\"active\" [routerLinkActiveOptions]=\"{exact:!item.exactTurnOff}\">\n      <a [routerLink]=\"item.path\" [queryParams]=\"item.queryParams\" *ngIf=\"item.path\">{{ item.name }} </a>\n      <i *ngIf=\"item.badge && item.badge > 0\">\n        <span class=\"bubble tabs-bubble\">{{ item.badge }}</span>\n      </i>\n      <span *ngIf=\"!item.path\">{{ item.name }}</span>\n    </li>\n  </ng-container>\n</ul>\n\n<div class=\"dropdown submenu-dropdown page-actions\" dropDown *ngIf=\"typeMenu === 'dropdown'\">\n  <button class=\"btn btn-default dropdown-toggle\" type=\"button\" id=\"dropdownMenu1\" data-toggle=\"dropdown\">\n    {{ activeName }}\n    <span class=\"caret\"></span>\n  </button>\n  <ul class=\"dropdown-menu dropdown-menu-right\" aria-labelledby=\"dropdownMenu1\">\n    <li *ngFor=\"let item of subMenuData\" routerLinkActive=\"active\">\n      <a routerLinkActive=\"active\" [routerLink]=\"item.path\" *ngIf=\"item.path\">{{ item.name }}</a>\n      <span *ngIf=\"!item.path\">{{ item.name }}</span>\n    </li>\n  </ul>\n</div>\n", styles: [".nav-wrapper{width:100%}@media (min-width: 768px){.navbar-nav{float:none}}li{display:flex;gap:4px}li .bubble.tabs-bubble{font-style:normal;background-color:var(--error-default-color);color:var(--error-on-color);font-weight:var(--font-weight-semibold);position:relative;display:block;bottom:unset;right:unset}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.SubMenuService }]; }, propDecorators: { typeMenu: [{
                type: Input
            }], activeName: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 