import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from "@angular/core";
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../../../../../../../common/menu-item-actions/menu-item-actions.directive";
export class NewAthenaNotificationItemsComponent {
    constructor(_eref) {
        this._eref = _eref;
        this.onClose = new EventEmitter();
        this.isLoaded = false;
    }
    ngOnInit() {
    }
    ngAfterViewInit() {
        setTimeout(() => {
            this.isLoaded = true;
        }, 0);
    }
    collapse(event) {
        if (this.isLoaded && !this._eref.nativeElement.contains(event.target)) {
            this.onClose.emit();
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: NewAthenaNotificationItemsComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: NewAthenaNotificationItemsComponent, selector: "[smz-ui-new-athena-notification-items]", inputs: { items: "items" }, outputs: { onClose: "onClose" }, host: { listeners: { "document:click": "collapse($event)" } }, ngImport: i0, template: `
    <li role="menuitem" *ngFor="let item of items; let index = index;">
      <a menuItemAction class="grid grid-nogutter items-center justify-start" style="display: flex;" [item]="item" [parent]="null" [breadcrumbs]="false" [tabindex]="index">
        <i *ngIf="item.icon != null" class="pi mr-3" [ngClass]="item.icon"></i>
        <div class="notification-item">
          <div class="notification-summary">{{ item.summary }}</div>
          <div class="notification-detail" [innerHtml]="item.details"></div>
        </div>
      </a>
    </li>
  `, isInline: true, styles: [".notification-summary{font-weight:600}.notification-detail{font-weight:400}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MenuItemActionsDirective, selector: "[menuItemAction]", inputs: ["item", "parent", "breadcrumbs"], outputs: ["collapse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: NewAthenaNotificationItemsComponent, decorators: [{
            type: Component,
            args: [{ selector: "[smz-ui-new-athena-notification-items]", host: { "(document:click)": "collapse($event)" }, changeDetection: ChangeDetectionStrategy.OnPush, template: `
    <li role="menuitem" *ngFor="let item of items; let index = index;">
      <a menuItemAction class="grid grid-nogutter items-center justify-start" style="display: flex;" [item]="item" [parent]="null" [breadcrumbs]="false" [tabindex]="index">
        <i *ngIf="item.icon != null" class="pi mr-3" [ngClass]="item.icon"></i>
        <div class="notification-item">
          <div class="notification-summary">{{ item.summary }}</div>
          <div class="notification-detail" [innerHtml]="item.details"></div>
        </div>
      </a>
    </li>
  `, styles: [".notification-summary{font-weight:600}.notification-detail{font-weight:400}\n"] }]
        }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { items: [{
                type: Input
            }], onClose: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLWl0ZW1zLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zbXotdWkvc3JjL2xpYi9tb2R1bGVzL3Ntei1sYXlvdXRzL2xheW91dHMvbmV3LWF0aGVuYS9jb21wb25lbnRzL25vdGlmaWNhdGlvbnMvaXRlbXMvbm90aWZpY2F0aW9uLWl0ZW1zLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQWlCLHVCQUF1QixFQUFFLFNBQVMsRUFBYyxZQUFZLEVBQUUsS0FBSyxFQUFV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