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";
export class C8yStepperProgress {
    constructor() {
        /** Emits the index: number of the step which was clicked */
        this.onStepClicked = new EventEmitter();
    }
    /** Called on click and emits the step index */
    stepSelected() {
        this.onStepClicked.emit(this.index);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C8yStepperProgress, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: C8yStepperProgress, selector: "c8y-stepper-progress", inputs: { iconOverrides: "iconOverrides", index: "index", selected: "selected", state: "state", disabled: "disabled" }, outputs: { onStepClicked: "onStepClicked" }, ngImport: i0, template: "<button\n  type=\"button\"\n  class=\"c8y-step\"\n  [ngClass]=\"{\n    active: selected,\n    'step-done': state === 'done' || state === '_done',\n    'step-error': state === 'error',\n    'step-warning': state === 'warning'\n  }\"\n  [disabled]=\"disabled\"\n  [ngSwitch]=\"!!(iconOverrides && iconOverrides[state])\"\n  (click)=\"stepSelected()\"\n>\n  <ng-container *ngSwitchCase=\"true\" [ngTemplateOutlet]=\"iconOverrides[state]\"></ng-container>\n  <ng-container *ngSwitchDefault [ngSwitch]=\"state\">\n    <span *ngSwitchCase=\"'edit'\">\n      <span [c8yIcon]=\"'edit'\"></span>\n    </span>\n    <span *ngSwitchCase=\"'done'\">\n      <span class=\"m-t-4\" [c8yIcon]=\"'check'\"></span>\n    </span>\n    <span *ngSwitchCase=\"'error'\">\n      <span class=\"m-t-4\" [c8yIcon]=\"'exclamation'\"></span>\n    </span>\n    <span *ngSwitchDefault>{{ index + 1 }}</span>\n  </ng-container>\n</button>\n", dependencies: [{ kind: "directive", type: i1.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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]" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: C8yStepperProgress, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-stepper-progress', template: "<button\n  type=\"button\"\n  class=\"c8y-step\"\n  [ngClass]=\"{\n    active: selected,\n    'step-done': state === 'done' || state === '_done',\n    'step-error': state === 'error',\n    'step-warning': state === 'warning'\n  }\"\n  [disabled]=\"disabled\"\n  [ngSwitch]=\"!!(iconOverrides && iconOverrides[state])\"\n  (click)=\"stepSelected()\"\n>\n  <ng-container *ngSwitchCase=\"true\" [ngTemplateOutlet]=\"iconOverrides[state]\"></ng-container>\n  <ng-container *ngSwitchDefault [ngSwitch]=\"state\">\n    <span *ngSwitchCase=\"'edit'\">\n      <span [c8yIcon]=\"'edit'\"></span>\n    </span>\n    <span *ngSwitchCase=\"'done'\">\n      <span class=\"m-t-4\" [c8yIcon]=\"'check'\"></span>\n    </span>\n    <span *ngSwitchCase=\"'error'\">\n      <span class=\"m-t-4\" [c8yIcon]=\"'exclamation'\"></span>\n    </span>\n    <span *ngSwitchDefault>{{ index + 1 }}</span>\n  </ng-container>\n</button>\n" }]
        }], propDecorators: { iconOverrides: [{
                type: Input
            }], index: [{
                type: Input
            }], selected: [{
                type: Input
            }], state: [{
                type: Input
            }], disabled: [{
                type: Input
            }], onStepClicked: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RlcHBlci1wcm9ncmVzcy5jb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