import { Component, EventEmitter, Output } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { map } from 'rxjs';
import { ModeService } from '../../services/mode.service';
import { VerificationService } from '../../services/verification.service';
import * as i0 from "@angular/core";
import * as i1 from "../../services/verification.service";
import * as i2 from "../../services/mode.service";
import * as i3 from "@angular/router";
import * as i4 from "@aztrix/components/otp-verification";
import * as i5 from "@angular/common";
import * as i6 from "@aztrix/helpers";
export class VerificationStepComponent {
    constructor(verification, _modeService, _route) {
        this.verification = verification;
        this._modeService = _modeService;
        this._route = _route;
        this.completed = new EventEmitter();
        this.verificationValue$ = this._route.queryParams.pipe(map((queryParams) => queryParams['verificationValue']));
        this.mode$ = this._modeService.mode$;
    }
}
VerificationStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: VerificationStepComponent, deps: [{ token: i1.VerificationService }, { token: i2.ModeService }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
VerificationStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: VerificationStepComponent, selector: "ax-verification-step", outputs: { completed: "completed" }, ngImport: i0, template: "<span>{{\n  'agreement.verification.snackbar.message'\n    | translate\n      : {\n          verificationType: 'agreement.verification.type.EMAIL' | translate | lowercase,\n          verificationValue: verificationValue$ | async\n        }\n}}</span>\n\n<ax-otp-verification\n  class=\"verification\"\n  [verificationValue]=\"verificationValue$ | async\"\n  verificationType=\"EMAIL\"\n  [verification]=\"verification.verification\"\n  [retryVerification]=\"verification.retryVerification\"\n  [canChangeValue]=\"false\"\n  (verificationComplete)=\"completed.next($event)\"\n></ax-otp-verification>\n", styles: [":host{text-align:center}.verification ::ng-deep .resend{color:#fff}.verification ::ng-deep .resend .resend-link{color:#fff}\n", ":host{display:flex;flex-direction:column;gap:.5rem}.form{margin-bottom:20px;background-color:#fff;border-radius:15px;padding:1.5rem 1.5rem 0}.value{display:flex;flex-direction:column;align-items:flex-end;margin-bottom:.5rem}.input{width:100%}.action{margin:1rem 1rem -20px}.action ::ng-deep .ax-button{font-size:1.2rem;text-transform:none;height:2.5rem}.back{margin:1rem auto -.5rem;width:auto}.back ::ng-deep .ax-button{font-size:small;height:2rem;width:auto;margin:0 auto}.back ::ng-deep .ax-button .icon{width:1rem;height:1rem}.verification ::ng-deep .verify{width:100%;display:block;position:relative;bottom:-20px}.verification ::ng-deep .verify .ax-button{font-size:1.2rem;text-transform:none;height:2.5rem;width:100%}.verification ::ng-deep .resend{height:0;position:relative;bottom:-30px}.verification ::ng-deep .error-message{height:0;position:relative;bottom:-30px;display:flex;text-align:center;flex-direction:column;gap:1rem}\n"], dependencies: [{ kind: "component", type: i4.OtpVerificationComponent, selector: "ax-otp-verification", inputs: ["verified", "verificationValue", "verificationType", "canChangeValue", "verification", "retryVerification"], outputs: ["verificationValueChanges", "verificationComplete"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: i6.TranslatePipe, name: "translate" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: VerificationStepComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-verification-step', template: "<span>{{\n  'agreement.verification.snackbar.message'\n    | translate\n      : {\n          verificationType: 'agreement.verification.type.EMAIL' | translate | lowercase,\n          verificationValue: verificationValue$ | async\n        }\n}}</span>\n\n<ax-otp-verification\n  class=\"verification\"\n  [verificationValue]=\"verificationValue$ | async\"\n  verificationType=\"EMAIL\"\n  [verification]=\"verification.verification\"\n  [retryVerification]=\"verification.retryVerification\"\n  [canChangeValue]=\"false\"\n  (verificationComplete)=\"completed.next($event)\"\n></ax-otp-verification>\n", styles: [":host{text-align:center}.verification ::ng-deep .resend{color:#fff}.verification ::ng-deep .resend .resend-link{color:#fff}\n", ":host{display:flex;flex-direction:column;gap:.5rem}.form{margin-bottom:20px;background-color:#fff;border-radius:15px;padding:1.5rem 1.5rem 0}.value{display:flex;flex-direction:column;align-items:flex-end;margin-bottom:.5rem}.input{width:100%}.action{margin:1rem 1rem -20px}.action ::ng-deep .ax-button{font-size:1.2rem;text-transform:none;height:2.5rem}.back{margin:1rem auto -.5rem;width:auto}.back ::ng-deep .ax-button{font-size:small;height:2rem;width:auto;margin:0 auto}.back ::ng-deep .ax-button .icon{width:1rem;height:1rem}.verification ::ng-deep .verify{width:100%;display:block;position:relative;bottom:-20px}.verification ::ng-deep .verify .ax-button{font-size:1.2rem;text-transform:none;height:2.5rem;width:100%}.verification ::ng-deep .resend{height:0;position:relative;bottom:-30px}.verification ::ng-deep .error-message{height:0;position:relative;bottom:-30px;display:flex;text-align:center;flex-direction:column;gap:1rem}\n"] }]
        }], ctorParameters: function () { return [{ type: i1.VerificationService }, { type: i2.ModeService }, { type: i3.ActivatedRoute }]; }, propDecorators: { completed: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyaWZpY2F0aW9uLXN0ZXAuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL2xvZ2luLW9yLXJlZ2lzdGVyLWZvcm0vdmVyaWZpY2F0aW9uLWZvcm0vdmVyaWZpY2F0aW9uLXN0ZXAvdmVyaWZpY2F0aW9uLXN0ZXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL2xvZ2luLW9yLXJlZ2lzdGVyLWZvcm0vdmVyaWZpY2F0aW9uLWZvcm0vdmVyaWZpY2F0aW9uLXN0ZXAvdmVyaWZpY2F0aW9uLXN0ZXAuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxZQUFZLEVBQUUsTUF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