import { Component } from '@angular/core';
import { REGISTER_MINIMUM_AGE } from '@aztrix/helpers';
import { PropertyRepresentation } from '@aztrix/sdk';
import { subYears } from 'date-fns';
import { AbstractRegisterStep } from '../abstract-register-step';
import * as i0 from "@angular/core";
import * as i1 from "@aztrix/components/property-edit";
import * as i2 from "../../step-switch/step-switch.component";
export class RegisterUserDataStepComponent extends AbstractRegisterStep {
    constructor() {
        super(...arguments);
        this.MAX_DATE = subYears(new Date(), REGISTER_MINIMUM_AGE);
        this.REGISTER_MINIMUM_AGE = REGISTER_MINIMUM_AGE;
    }
    get birthdayForm() {
        return this.propertiesForm.get(PropertyRepresentation.TypeEnum.BIRTHDAY);
    }
}
RegisterUserDataStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: RegisterUserDataStepComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
RegisterUserDataStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: RegisterUserDataStepComponent, selector: "ax-register-user-data-step", usesInheritance: true, ngImport: i0, template: "<ax-date-property-edit\n  [showIcon]=\"false\"\n  [form]=\"birthdayForm\"\n  name=\"register birthday\"\n  [required]=\"true\"\n  [maxDate]=\"MAX_DATE\"\n></ax-date-property-edit>\n\n<ax-step-switch (continue)=\"_continue()\" (back)=\"_back()\"></ax-step-switch>\n", styles: ["", ":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: i1.DatePropertyEditComponent, selector: "ax-date-property-edit", inputs: ["minDate", "maxDate"] }, { kind: "component", type: i2.StepSwitchComponent, selector: "ax-step-switch", inputs: ["loading$"], outputs: ["continue", "back"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: RegisterUserDataStepComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-register-user-data-step', template: "<ax-date-property-edit\n  [showIcon]=\"false\"\n  [form]=\"birthdayForm\"\n  name=\"register birthday\"\n  [required]=\"true\"\n  [maxDate]=\"MAX_DATE\"\n></ax-date-property-edit>\n\n<ax-step-switch (continue)=\"_continue()\" (back)=\"_back()\"></ax-step-switch>\n", styles: [":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"] }]
        }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWx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