import { Component } from '@angular/core';
import { CellRendererContext, gettext } from '@c8y/ngx-components';
import { ColumnUtilService } from './column-util.service';
import * as i0 from "@angular/core";
import * as i1 from "@c8y/ngx-components";
import * as i2 from "./column-util.service";
import * as i3 from "@angular/common";
export class AlarmsCellRendererComponent {
    constructor(context, columnUtilService) {
        this.context = context;
        this.columnUtilService = columnUtilService;
        this.linkAriaLabel = gettext('See alarms for device "{{ name }}"');
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmsCellRendererComponent, deps: [{ token: i1.CellRendererContext }, { token: i2.ColumnUtilService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: AlarmsCellRendererComponent, selector: "c8y-alarms-cell-renderer", ngImport: i0, template: "<a\n  class=\"d-flex a-i-center flex-wrap gap-4 no-decoration\"\n  [href]=\"columnUtilService.getAlarmsHref(context.item)\"\n  [attr.aria-label]=\"\n    linkAriaLabel | translate: { name: columnUtilService.getProperName(context.item) }\n  \"\n  *ngIf=\"\n    context.item.c8y_ActiveAlarmsStatus?.critical ||\n    context.item.c8y_ActiveAlarmsStatus?.major ||\n    context.item.c8y_ActiveAlarmsStatus?.minor ||\n    context.item.c8y_ActiveAlarmsStatus?.warning\n  \"\n>\n  <span\n    class=\"c8y-icon-badge\"\n    data-cy=\"alarms.cell-renderer--critical-alarm-badge\"\n    title=\"{{ context.item.c8y_ActiveAlarmsStatus?.critical }} {{ 'Critical alarms' | translate }}\"\n    *ngIf=\"context.item.c8y_ActiveAlarmsStatus?.critical\"\n  >\n    <i [c8yIcon]=\"'exclamation-circle'\" class=\"status critical stroked-icon\" data-cy=\"alarms.cell-renderer--critical-alarm-icon\"></i>\n    <span class=\"badge badge-info\">{{ context.item.c8y_ActiveAlarmsStatus?.critical }}</span>\n  </span>\n  <span\n    class=\"c8y-icon-badge\"\n    title=\"{{ context.item.c8y_ActiveAlarmsStatus?.major }} {{ 'Major alarms' | translate }}\"\n    *ngIf=\"context.item.c8y_ActiveAlarmsStatus?.major\"\n  >\n    <i [c8yIcon]=\"'warning'\" class=\"status major stroked-icon\"></i>\n    <span class=\"badge badge-info\">{{ context.item.c8y_ActiveAlarmsStatus?.major }}</span>\n  </span>\n  <span\n    class=\"c8y-icon-badge\"\n    title=\"{{ context.item.c8y_ActiveAlarmsStatus?.minor }} {{ 'Minor alarms' | translate }}\"\n    *ngIf=\"context.item.c8y_ActiveAlarmsStatus?.minor\"\n  >\n    <i [c8yIcon]=\"'high-priority'\" class=\"status minor stroked-icon\"></i>\n    <span class=\"badge badge-info\">{{ context.item.c8y_ActiveAlarmsStatus?.minor }}</span>\n  </span>\n  <span\n    class=\"c8y-icon-badge\"\n    title=\"{{ context.item.c8y_ActiveAlarmsStatus?.warning }} {{ 'Warning alarms' | translate }}\"\n    *ngIf=\"context.item.c8y_ActiveAlarmsStatus?.warning\"\n  >\n    <i [c8yIcon]=\"'info-circle'\" class=\"status warning stroked-icon\"></i>\n    <span class=\"badge badge-info\">{{ context.item.c8y_ActiveAlarmsStatus?.warning }}</span>\n  </span>\n</a>\n", dependencies: [{ kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: AlarmsCellRendererComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-alarms-cell-renderer', template: "<a\n  class=\"d-flex a-i-center flex-wrap gap-4 no-decoration\"\n  [href]=\"columnUtilService.getAlarmsHref(context.item)\"\n  [attr.aria-label]=\"\n    linkAriaLabel | translate: { name: columnUtilService.getProperName(context.item) }\n  \"\n  *ngIf=\"\n    context.item.c8y_ActiveAlarmsStatus?.critical ||\n    context.item.c8y_ActiveAlarmsStatus?.major ||\n    context.item.c8y_ActiveAlarmsStatus?.minor ||\n    context.item.c8y_ActiveAlarmsStatus?.warning\n  \"\n>\n  <span\n    class=\"c8y-icon-badge\"\n    data-cy=\"alarms.cell-renderer--critical-alarm-badge\"\n    title=\"{{ context.item.c8y_ActiveAlarmsStatus?.critical }} {{ 'Critical alarms' | translate }}\"\n    *ngIf=\"context.item.c8y_ActiveAlarmsStatus?.critical\"\n  >\n    <i [c8yIcon]=\"'exclamation-circle'\" class=\"status critical stroked-icon\" data-cy=\"alarms.cell-renderer--critical-alarm-icon\"></i>\n    <span class=\"badge badge-info\">{{ context.item.c8y_ActiveAlarmsStatus?.critical }}</span>\n  </span>\n  <span\n    class=\"c8y-icon-badge\"\n    title=\"{{ context.item.c8y_ActiveAlarmsStatus?.major }} {{ 'Major alarms' | translate }}\"\n    *ngIf=\"context.item.c8y_ActiveAlarmsStatus?.major\"\n  >\n    <i [c8yIcon]=\"'warning'\" class=\"status major stroked-icon\"></i>\n    <span class=\"badge badge-info\">{{ context.item.c8y_ActiveAlarmsStatus?.major }}</span>\n  </span>\n  <span\n    class=\"c8y-icon-badge\"\n    title=\"{{ context.item.c8y_ActiveAlarmsStatus?.minor }} {{ 'Minor alarms' | translate }}\"\n    *ngIf=\"context.item.c8y_ActiveAlarmsStatus?.minor\"\n  >\n    <i [c8yIcon]=\"'high-priority'\" class=\"status minor stroked-icon\"></i>\n    <span class=\"badge badge-info\">{{ context.item.c8y_ActiveAlarmsStatus?.minor }}</span>\n  </span>\n  <span\n    class=\"c8y-icon-badge\"\n    title=\"{{ context.item.c8y_ActiveAlarmsStatus?.warning }} {{ 'Warning alarms' | translate }}\"\n    *ngIf=\"context.item.c8y_ActiveAlarmsStatus?.warning\"\n  >\n    <i [c8yIcon]=\"'info-circle'\" class=\"status warning stroked-icon\"></i>\n    <span class=\"badge badge-info\">{{ context.item.c8y_ActiveAlarmsStatus?.warning }}</span>\n  </span>\n</a>\n" }]
        }], ctorParameters: () => [{ type: i1.CellRendererContext }, { type: i2.ColumnUtilService }] });
//# sourceMappingURL=data:application/json;base64, 