import { Component, Input } from '@angular/core';
import { gettext } from '@c8y/ngx-components';
import * as i0 from "@angular/core";
import * as i1 from "@c8y/ngx-components";
import * as i2 from "@angular/common";
export class DatapointTemplatePopoverComponent {
    constructor() {
        this.attributes = [
            {
                label: gettext('Fragment'),
                key: 'fragment'
            },
            {
                label: gettext('Series'),
                key: 'series'
            },
            {
                label: gettext('Unit'),
                key: 'unit'
            },
            {
                label: gettext('Range'),
                key: 'min'
            },
            {
                label: gettext('Target'),
                key: 'target'
            },
            {
                label: gettext('Yellow range'),
                labelColor: 'yellow',
                key: 'yellowRangeMin'
            },
            {
                label: gettext('Red range'),
                labelColor: 'red',
                key: 'redRangeMin'
            }
        ];
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointTemplatePopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DatapointTemplatePopoverComponent, selector: "c8y-datapoint-template-popover", inputs: { datapoint: "datapoint", attributes: "attributes" }, ngImport: i0, template: "<p class=\"text-medium\">\n  <i c8yIcon=\"circle\" [style.color]=\"datapoint.color\"></i>\n  {{ datapoint.label }}\n</p>\n<p>{{ datapoint.description }}</p>\n\n<ul class=\"list-unstyled small p-t-16\">\n  <ng-container *ngFor=\"let attribute of attributes; let i = index\">\n    <li\n      class=\"p-t-4 p-b-4 d-flex separator-bottom text-nowrap\"\n      *ngIf=\"datapoint[attribute.key] !== undefined\"\n    >\n      <label class=\"small m-b-0 m-r-8\">\n        <i *ngIf=\"attribute.labelColor\" c8yIcon=\"square\" [style.color]=\"attribute.labelColor\"></i>\n        {{ attribute.label | translate }}\n      </label>\n      <ng-container [ngSwitch]=\"attribute.key\">\n        <span *ngSwitchCase=\"'min'\" class=\"m-l-auto\">\n          {{ datapoint['min'] }} \u2014 {{ datapoint['max'] }}\n        </span>\n        <span *ngSwitchCase=\"'yellowRangeMin'\" class=\"m-l-auto\">\n          {{ datapoint['yellowRangeMin'] }} \u2014 {{ datapoint['yellowRangeMax'] }}\n        </span>\n        <span *ngSwitchCase=\"'redRangeMin'\" class=\"m-l-auto\">\n          {{ datapoint['redRangeMin'] }} \u2014 {{ datapoint['redRangeMax'] }}\n        </span>\n        <span *ngSwitchDefault class=\"m-l-auto\">\n          {{ datapoint[attribute.key] }}\n        </span>\n      </ng-container>\n    </li>\n  </ng-container>\n</ul>\n", dependencies: [{ kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { 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: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: i1.C8yTranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DatapointTemplatePopoverComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-datapoint-template-popover', template: "<p class=\"text-medium\">\n  <i c8yIcon=\"circle\" [style.color]=\"datapoint.color\"></i>\n  {{ datapoint.label }}\n</p>\n<p>{{ datapoint.description }}</p>\n\n<ul class=\"list-unstyled small p-t-16\">\n  <ng-container *ngFor=\"let attribute of attributes; let i = index\">\n    <li\n      class=\"p-t-4 p-b-4 d-flex separator-bottom text-nowrap\"\n      *ngIf=\"datapoint[attribute.key] !== undefined\"\n    >\n      <label class=\"small m-b-0 m-r-8\">\n        <i *ngIf=\"attribute.labelColor\" c8yIcon=\"square\" [style.color]=\"attribute.labelColor\"></i>\n        {{ attribute.label | translate }}\n      </label>\n      <ng-container [ngSwitch]=\"attribute.key\">\n        <span *ngSwitchCase=\"'min'\" class=\"m-l-auto\">\n          {{ datapoint['min'] }} \u2014 {{ datapoint['max'] }}\n        </span>\n        <span *ngSwitchCase=\"'yellowRangeMin'\" class=\"m-l-auto\">\n          {{ datapoint['yellowRangeMin'] }} \u2014 {{ datapoint['yellowRangeMax'] }}\n        </span>\n        <span *ngSwitchCase=\"'redRangeMin'\" class=\"m-l-auto\">\n          {{ datapoint['redRangeMin'] }} \u2014 {{ datapoint['redRangeMax'] }}\n        </span>\n        <span *ngSwitchDefault class=\"m-l-auto\">\n          {{ datapoint[attribute.key] }}\n        </span>\n      </ng-container>\n    </li>\n  </ng-container>\n</ul>\n" }]
        }], propDecorators: { datapoint: [{
                type: Input
            }], attributes: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 