import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@ionic/angular";
import * as i3 from "@iotize/app-common";
export class MonitoringActionsComponent {
    set checkedButtonIndex(index) {
        if (index !== undefined) {
            this.value = this.actions[index]?.value;
        }
    }
    constructor() {
        this.segment = true;
        this.actions = [];
        this.disabled = false;
        this.color = 'primary';
    }
}
/** @nocollapse */ MonitoringActionsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MonitoringActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ MonitoringActionsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MonitoringActionsComponent, selector: "app-monitoring-actions", inputs: { segment: "segment", actions: "actions", checkedButtonIndex: "checkedButtonIndex", disabled: "disabled", color: "color" }, ngImport: i0, template: "<ion-buttons *ngIf=\"!segment\">\n  <ion-button\n    *ngFor=\"let action of actions\"\n    [disabled]=\"disabled || action.disabled\"\n    (click)=\"action.action()\"\n  >\n    <app-common-icon\n      *ngIf=\"action.icon\"\n      [image]=\"action.icon\"\n    ></app-common-icon>\n    {{ action.label }}\n  </ion-button>\n</ion-buttons>\n<ion-segment\n  *ngIf=\"segment\"\n  [value]=\"value\"\n  [scrollable]=\"true\"\n  [color]=\"color\"\n  style=\"overflow: auto; width: 100%\"\n>\n  <ion-segment-button\n    *ngFor=\"let action of actions; let i = index\"\n    [value]=\"action.value\"\n    [disabled]=\"disabled || action.disabled\"\n    (click)=\"action.action()\"\n  >\n    <app-common-icon\n      *ngIf=\"action.icon\"\n      [image]=\"action.icon\"\n    ></app-common-icon>\n    {{ action.label }}\n  </ion-segment-button>\n</ion-segment>\n", styles: [".input-wrapper{position:relative;z-index:9999}ion-buttons{margin-left:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: i2.IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: i2.IonSegment, selector: "ion-segment", inputs: ["color", "disabled", "mode", "scrollable", "selectOnFocus", "swipeGesture", "value"] }, { kind: "component", type: i2.IonSegmentButton, selector: "ion-segment-button", inputs: ["disabled", "layout", "mode", "type", "value"] }, { kind: "directive", type: i2.SelectValueAccessor, selector: "ion-range, ion-select, ion-radio-group, ion-segment, ion-datetime" }, { kind: "component", type: i3.IconComponent, selector: "app-common-icon", inputs: ["imageSize", "color", "image"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MonitoringActionsComponent, decorators: [{
            type: Component,
            args: [{ selector: 'app-monitoring-actions', template: "<ion-buttons *ngIf=\"!segment\">\n  <ion-button\n    *ngFor=\"let action of actions\"\n    [disabled]=\"disabled || action.disabled\"\n    (click)=\"action.action()\"\n  >\n    <app-common-icon\n      *ngIf=\"action.icon\"\n      [image]=\"action.icon\"\n    ></app-common-icon>\n    {{ action.label }}\n  </ion-button>\n</ion-buttons>\n<ion-segment\n  *ngIf=\"segment\"\n  [value]=\"value\"\n  [scrollable]=\"true\"\n  [color]=\"color\"\n  style=\"overflow: auto; width: 100%\"\n>\n  <ion-segment-button\n    *ngFor=\"let action of actions; let i = index\"\n    [value]=\"action.value\"\n    [disabled]=\"disabled || action.disabled\"\n    (click)=\"action.action()\"\n  >\n    <app-common-icon\n      *ngIf=\"action.icon\"\n      [image]=\"action.icon\"\n    ></app-common-icon>\n    {{ action.label }}\n  </ion-segment-button>\n</ion-segment>\n", styles: [".input-wrapper{position:relative;z-index:9999}ion-buttons{margin-left:0}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { segment: [{
                type: Input
            }], actions: [{
                type: Input
            }], checkedButtonIndex: [{
                type: Input
            }], disabled: [{
                type: Input
            }], color: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9uaXRvcmluZy1hY3Rpb25zLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2lvdGl6ZS1pb25pYy9tb25pdG9yaW5nL3NyYy9saWIvdWktY29tcG9uZW50cy9tb25pdG9yaW5nLWFjdGlvbnMvbW9uaXRvcmluZy1hY3Rpb25zLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2lvdGl6ZS1pb25pYy9tb25pdG9yaW5nL3NyYy9saWIvdWktY29tcG9uZW50cy9tb25pdG9yaW5nLWFjdGlvbnMvbW9uaXRvcmluZy1hY3Rpb25zLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7OztBQWVqRCxNQUFNLE9BQU8sMEJBQTBCO0lBT3JDLElBQWEsa0JBQWtCLENBQUMsS0FBYTtRQUMzQyxJQUFJLEtBQUssS0FBSyxTQUFTLEVBQUU7WUFDdkIsSUFBSSxDQUFDLEtBQUssR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxFQUFFLEtBQUssQ0FBQztTQUN6QztJQUNILENBQUM7SUFNRDtRQWhCUyxZQUFPLEdBQUcsSUFBSSxDQUFDO1FBRWYsWUFBTyxHQUFpQixFQUFFLENBQUM7UUFVM0IsYUFBUSxHQUFHLEtBQUssQ0FBQztRQUVqQixVQUF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