import { __decorate } from "tslib";
import { Component, ViewEncapsulation } from '@angular/core';
import { UntilDestroy } from '@ngneat/until-destroy';
import * as i0 from "@angular/core";
import * as i1 from "../../dynamicdialog/dynamicdialog-ref";
import * as i2 from "../../models/smz-dialogs";
import * as i3 from "../../../../standalones/smz-ui-guides/services/smz-ui-guides.service";
import * as i4 from "@angular/common";
import * as i5 from "primeng/button";
import * as i6 from "@angular/flex-layout/extended";
import * as i7 from "primeng/toolbar";
let GuideFooterComponent = class GuideFooterComponent {
    constructor(refService, dialogConfig, guidesServices) {
        this.refService = refService;
        this.dialogConfig = dialogConfig;
        this.guidesServices = guidesServices;
    }
    ngOnInit() {
    }
    previous() {
        const overlay = this.dialogConfig.data.overlayPanel;
        overlay.state.context.step--;
        this.closeCurrentDialog();
        this.guidesServices.showCurrentStep(overlay.state);
    }
    next() {
        const overlay = this.dialogConfig.data.overlayPanel;
        const step = overlay.state.steps[overlay.state.context.step];
        overlay.callbacks.concluded(step);
        overlay.state.context.step++;
        this.closeCurrentDialog();
        this.guidesServices.showCurrentStep(overlay.state);
    }
    conclude() {
        this.closeCurrentDialog();
    }
    closeCurrentDialog() {
        this.refService.close();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: GuideFooterComponent, deps: [{ token: i1.DynamicDialogRef }, { token: i2.SmzDynamicDialogConfig }, { token: i3.SmzUiGuidesService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: GuideFooterComponent, selector: "smz-guide-footer", ngImport: i0, template: "<ng-container *ngIf=\"dialogConfig.data?.overlayPanel as overlay\">\r\n\r\n    <p-toolbar class=\"smz-guide-footer\">\r\n        <div class=\"w-full grid grid-nogutter items-center justify-between gap-2\">\r\n\r\n            <button\r\n                *ngIf=\"overlay.state.allowBackNavigation\"\r\n                [disabled]=\"overlay.state.context.step <= 1\"\r\n                pButton\r\n                type=\"button\"\r\n                icon=\"fa-solid fa-arrow-left-long\"\r\n                class=\"p-button-rounded p-button-text text-lg w-11 h-11\"\r\n                (click)=\"previous()\">\r\n            </button>\r\n\r\n            <div *ngIf=\"overlay.state.showSummaryCount\" class=\"grid grid-nogutter items-center justify-center gap-2\">\r\n                <ng-container *ngFor=\"let step of overlay.state.steps; let index = index\">\r\n                    <div\r\n                        class=\"rounded-full h-4 w-4 border-1 border-surface-border\"\r\n                        [ngClass]=\"{ 'bg-primary-color' : overlay.state.context.step === (index + 1), 'bg-surface-ground' : overlay.state.context.step !== (index + 1) }\">\r\n                    </div>\r\n                </ng-container>\r\n            </div>\r\n\r\n            <button\r\n                *ngIf=\"overlay.state.context.step === overlay.state.steps.length\"\r\n                pButton\r\n                type=\"button\"\r\n                icon=\"fa-solid fa-check\"\r\n                class=\"p-button-rounded p-button-text text-lg w-11 h-11\"\r\n                (click)=\"conclude()\">\r\n            </button>\r\n\r\n            <button\r\n                *ngIf=\"overlay.state.context.step < overlay.state.steps.length\"\r\n                pButton\r\n                type=\"button\"\r\n                icon=\"fa-solid fa-arrow-right-long\"\r\n                class=\"p-button-rounded p-button-text text-lg w-11 h-11\"\r\n                (click)=\"next()\">\r\n            </button>\r\n\r\n        </div>\r\n    </p-toolbar>\r\n\r\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading", "severity", "raised", "rounded", "text", "outlined", "size", "plain"] }, { kind: "directive", type: i6.DefaultClassDirective, selector: "  [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl],  [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl],  [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: i7.Toolbar, selector: "p-toolbar", inputs: ["style", "styleClass", "ariaLabelledBy"] }], encapsulation: i0.ViewEncapsulation.None }); }
};
GuideFooterComponent = __decorate([
    UntilDestroy()
], GuideFooterComponent);
export { GuideFooterComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: GuideFooterComponent, decorators: [{
            type: Component,
            args: [{ selector: 'smz-guide-footer', encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"dialogConfig.data?.overlayPanel as overlay\">\r\n\r\n    <p-toolbar class=\"smz-guide-footer\">\r\n        <div class=\"w-full grid grid-nogutter items-center justify-between gap-2\">\r\n\r\n            <button\r\n                *ngIf=\"overlay.state.allowBackNavigation\"\r\n                [disabled]=\"overlay.state.context.step <= 1\"\r\n                pButton\r\n                type=\"button\"\r\n                icon=\"fa-solid fa-arrow-left-long\"\r\n                class=\"p-button-rounded p-button-text text-lg w-11 h-11\"\r\n                (click)=\"previous()\">\r\n            </button>\r\n\r\n            <div *ngIf=\"overlay.state.showSummaryCount\" class=\"grid grid-nogutter items-center justify-center gap-2\">\r\n                <ng-container *ngFor=\"let step of overlay.state.steps; let index = index\">\r\n                    <div\r\n                        class=\"rounded-full h-4 w-4 border-1 border-surface-border\"\r\n                        [ngClass]=\"{ 'bg-primary-color' : overlay.state.context.step === (index + 1), 'bg-surface-ground' : overlay.state.context.step !== (index + 1) }\">\r\n                    </div>\r\n                </ng-container>\r\n            </div>\r\n\r\n            <button\r\n                *ngIf=\"overlay.state.context.step === overlay.state.steps.length\"\r\n                pButton\r\n                type=\"button\"\r\n                icon=\"fa-solid fa-check\"\r\n                class=\"p-button-rounded p-button-text text-lg w-11 h-11\"\r\n                (click)=\"conclude()\">\r\n            </button>\r\n\r\n            <button\r\n                *ngIf=\"overlay.state.context.step < overlay.state.steps.length\"\r\n                pButton\r\n                type=\"button\"\r\n                icon=\"fa-solid fa-arrow-right-long\"\r\n                class=\"p-button-rounded p-button-text text-lg w-11 h-11\"\r\n                (click)=\"next()\">\r\n            </button>\r\n\r\n        </div>\r\n    </p-toolbar>\r\n\r\n</ng-container>" }]
        }], ctorParameters: () => [{ type: i1.DynamicDialogRef }, { type: i2.SmzDynamicDialogConfig }, { type: i3.SmzUiGuidesService }] });
//# sourceMappingURL=data:application/json;base64, 