/*
 * Copyright 2015-2024 Ritense BV, the Netherlands.
 *
 * Licensed under EUPL, Version 1.2 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { Component, Input } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import * as i0 from "@angular/core";
import * as i1 from "../../../services/stepper.service";
import * as i2 from "@angular/common";
import * as i3 from "carbon-components-angular";
import * as i4 from "@ngx-translate/core";
/**
 * @deprecated Migrate old design to Carbon
 */
export class StepperFooterStepComponent {
    constructor(stepperService) {
        this.stepperService = stepperService;
        this.nextButtonEnabled = false;
        this.completeButtonEnabled = false;
        this.nextButtonTranslationKey = '';
        this.cancelButtonTranslationKey = '';
        this.completeButtonTranslationKey = '';
        this.completeButtonMdiIcon = '';
        this.showCompleteButton = true;
        this.stepIndex$ = new BehaviorSubject(-1);
        this.isLastStep$ = new BehaviorSubject(false);
        this.currentStepIndex$ = this.stepperService.currentStepIndex$;
        this.disabled$ = this.stepperService.disabled$;
    }
    goToNextStep() {
        this.stepperService.goToNextStep();
    }
    cancel() {
        this.stepperService.cancelClick();
    }
    complete() {
        this.stepperService.complete();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StepperFooterStepComponent, deps: [{ token: i1.StepperService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: StepperFooterStepComponent, selector: "v-stepper-footer-step", inputs: { nextButtonEnabled: "nextButtonEnabled", completeButtonEnabled: "completeButtonEnabled", nextButtonTranslationKey: "nextButtonTranslationKey", cancelButtonTranslationKey: "cancelButtonTranslationKey", completeButtonTranslationKey: "completeButtonTranslationKey", completeButtonMdiIcon: "completeButtonMdiIcon", showCompleteButton: "showCompleteButton" }, ngImport: i0, template: "<!--\n  ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n  ~\n  ~ Licensed under EUPL, Version 1.2 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" basis,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<div class=\"stepper-footer-step\" *ngIf=\"(currentStepIndex$ | async) === (stepIndex$ | async)\">\n  <ng-container *ngIf=\"{disabled: disabled$ | async, isLastStep: isLastStep$ | async} as obs\">\n    <ng-container\n      *ngTemplateOutlet=\"cancelButton; context: {disabled: obs.disabled}\"\n    ></ng-container>\n    <ng-container *ngIf=\"obs.isLastStep === false\">\n      <ng-container\n        *ngTemplateOutlet=\"nextButton; context: {disabled: obs.disabled}\"\n      ></ng-container>\n    </ng-container>\n    <ng-container *ngIf=\"obs.isLastStep === true && showCompleteButton\">\n      <ng-container\n        *ngTemplateOutlet=\"completeButton; context: {disabled: obs.disabled}\"\n      ></ng-container>\n    </ng-container>\n  </ng-container>\n</div>\n\n<ng-template #cancelButton let-disabled=\"disabled\">\n  <button cdsButton=\"secondary\" (click)=\"cancel()\" [disabled]=\"disabled\">\n    {{\n      cancelButtonTranslationKey\n        ? (cancelButtonTranslationKey | translate)\n        : ('stepper.cancelButtonText' | translate)\n    }}\n  </button>\n</ng-template>\n\n<ng-template #nextButton let-disabled=\"disabled\">\n  <button cdsButton=\"primary\" [disabled]=\"!nextButtonEnabled || disabled\" (click)=\"goToNextStep()\">\n    {{\n      nextButtonTranslationKey\n        ? (nextButtonTranslationKey | translate)\n        : ('stepper.nextButtonText' | translate)\n    }}\n  </button>\n</ng-template>\n\n<ng-template #completeButton let-disabled=\"disabled\">\n  <button cdsButton=\"primary\" [disabled]=\"!completeButtonEnabled || disabled\" (click)=\"complete()\">\n    {{\n      completeButtonTranslationKey\n        ? (completeButtonTranslationKey | translate)\n        : ('stepper.completeButtonText' | translate)\n    }}\n  </button>\n</ng-template>\n", styles: [".stepper-footer-step{display:flex;width:100%;flex-direction:row;justify-content:space-between}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.TranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StepperFooterStepComponent, decorators: [{
            type: Component,
            args: [{ selector: 'v-stepper-footer-step', template: "<!--\n  ~ Copyright 2015-2024 Ritense BV, the Netherlands.\n  ~\n  ~ Licensed under EUPL, Version 1.2 (the \"License\");\n  ~ you may not use this file except in compliance with the License.\n  ~ You may obtain a copy of the License at\n  ~\n  ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n  ~\n  ~ Unless required by applicable law or agreed to in writing, software\n  ~ distributed under the License is distributed on an \"AS IS\" basis,\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n  ~ See the License for the specific language governing permissions and\n  ~ limitations under the License.\n  -->\n\n<div class=\"stepper-footer-step\" *ngIf=\"(currentStepIndex$ | async) === (stepIndex$ | async)\">\n  <ng-container *ngIf=\"{disabled: disabled$ | async, isLastStep: isLastStep$ | async} as obs\">\n    <ng-container\n      *ngTemplateOutlet=\"cancelButton; context: {disabled: obs.disabled}\"\n    ></ng-container>\n    <ng-container *ngIf=\"obs.isLastStep === false\">\n      <ng-container\n        *ngTemplateOutlet=\"nextButton; context: {disabled: obs.disabled}\"\n      ></ng-container>\n    </ng-container>\n    <ng-container *ngIf=\"obs.isLastStep === true && showCompleteButton\">\n      <ng-container\n        *ngTemplateOutlet=\"completeButton; context: {disabled: obs.disabled}\"\n      ></ng-container>\n    </ng-container>\n  </ng-container>\n</div>\n\n<ng-template #cancelButton let-disabled=\"disabled\">\n  <button cdsButton=\"secondary\" (click)=\"cancel()\" [disabled]=\"disabled\">\n    {{\n      cancelButtonTranslationKey\n        ? (cancelButtonTranslationKey | translate)\n        : ('stepper.cancelButtonText' | translate)\n    }}\n  </button>\n</ng-template>\n\n<ng-template #nextButton let-disabled=\"disabled\">\n  <button cdsButton=\"primary\" [disabled]=\"!nextButtonEnabled || disabled\" (click)=\"goToNextStep()\">\n    {{\n      nextButtonTranslationKey\n        ? (nextButtonTranslationKey | translate)\n        : ('stepper.nextButtonText' | translate)\n    }}\n  </button>\n</ng-template>\n\n<ng-template #completeButton let-disabled=\"disabled\">\n  <button cdsButton=\"primary\" [disabled]=\"!completeButtonEnabled || disabled\" (click)=\"complete()\">\n    {{\n      completeButtonTranslationKey\n        ? (completeButtonTranslationKey | translate)\n        : ('stepper.completeButtonText' | translate)\n    }}\n  </button>\n</ng-template>\n", styles: [".stepper-footer-step{display:flex;width:100%;flex-direction:row;justify-content:space-between}\n/*!\n * Copyright 2015-2024 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"] }]
        }], ctorParameters: () => [{ type: i1.StepperService }], propDecorators: { nextButtonEnabled: [{
                type: Input
            }], completeButtonEnabled: [{
                type: Input
            }], nextButtonTranslationKey: [{
                type: Input
            }], cancelButtonTranslationKey: [{
                type: Input
            }], completeButtonTranslationKey: [{
                type: Input
            }], completeButtonMdiIcon: [{
                type: Input
            }], showCompleteButton: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 