import { Component, Input, Output, EventEmitter } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "../common/icon.directive";
import * as i2 from "@angular/common";
import * as i3 from "ngx-bootstrap/tooltip";
import * as i4 from "../i18n/c8y-translate.pipe";
export class InputGroupListComponent {
    constructor() {
        this.plus = true;
        this.minus = true;
        this.onRemove = new EventEmitter();
        this.onAdd = new EventEmitter();
    }
    add() {
        this.onAdd.emit(this.index);
    }
    remove() {
        this.onRemove.emit(this.index);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: InputGroupListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.9", type: InputGroupListComponent, selector: "c8y-input-group-list", inputs: { plus: "plus", minus: "minus", index: "index" }, outputs: { onRemove: "onRemove", onAdd: "onAdd" }, ngImport: i0, template: "<ng-container>\n  <div class=\"input-group\">\n    <ng-content></ng-content>\n    <div class=\"input-group-btn\">\n      <button\n        *ngIf=\"minus\"\n        tooltip=\"{{ 'Remove' | translate }}\"\n        [attr.aria-label]=\"'Remove' | translate\"\n        [delay]=\"500\"\n        type=\"button\"\n        class=\"btn btn-dot btn-dot--danger\"\n        (click)=\"remove()\"\n      >\n        <i c8yIcon=\"minus-circle\"></i>\n      </button>\n      <button\n        *ngIf=\"plus\"\n        tooltip=\"{{ 'Add' | translate }}\"\n        [attr.aria-label]=\"'Add' | translate\"\n        [delay]=\"500\"\n        type=\"button\"\n        class=\"btn btn-dot text-primary\"\n        (click)=\"add()\"\n      >\n        <i c8yIcon=\"plus-circle\"></i>\n      </button>\n    </div>\n  </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "pipe", type: i4.C8yTranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.9", ngImport: i0, type: InputGroupListComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-input-group-list', template: "<ng-container>\n  <div class=\"input-group\">\n    <ng-content></ng-content>\n    <div class=\"input-group-btn\">\n      <button\n        *ngIf=\"minus\"\n        tooltip=\"{{ 'Remove' | translate }}\"\n        [attr.aria-label]=\"'Remove' | translate\"\n        [delay]=\"500\"\n        type=\"button\"\n        class=\"btn btn-dot btn-dot--danger\"\n        (click)=\"remove()\"\n      >\n        <i c8yIcon=\"minus-circle\"></i>\n      </button>\n      <button\n        *ngIf=\"plus\"\n        tooltip=\"{{ 'Add' | translate }}\"\n        [attr.aria-label]=\"'Add' | translate\"\n        [delay]=\"500\"\n        type=\"button\"\n        class=\"btn btn-dot text-primary\"\n        (click)=\"add()\"\n      >\n        <i c8yIcon=\"plus-circle\"></i>\n      </button>\n    </div>\n  </div>\n</ng-container>\n" }]
        }], propDecorators: { plus: [{
                type: Input
            }], minus: [{
                type: Input
            }], index: [{
                type: Input
            }], onRemove: [{
                type: Output
            }], onAdd: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtZ3JvdXAtbGlzdC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9jb3JlL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