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 AthenaNotificationItemsComponent {
    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: AthenaNotificationItemsComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: AthenaNotificationItemsComponent, selector: "[smz-ui-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: AthenaNotificationItemsComponent, decorators: [{
            type: Component,
            args: [{ selector: "[smz-ui-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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLWl0ZW1zLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1zbXotdWkvc3JjL2xpYi9tb2R1bGVzL3Ntei1sYXlvdXRzL2xheW91dHMvYXRoZW5hL2NvbXBvbmVudHMvbm90aWZpY2F0aW9ucy9pdGVtcy9ub3RpZmljYXRpb24taXRlbXMuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBaUIsdUJBQXVCLEVBQUUsU0FBUyxFQUFjLFlBQVksRUFBRSxLQUFLLEVBQVUsTUFBTSxFQUFFLE1BQU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