var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ComponentHelper } from '../../../classes/component-helper';
import { AuthService } from '../../../services/auth.service';
var ConfirmAccountEcComponent = /** @class */ (function (_super) {
    __extends(ConfirmAccountEcComponent, _super);
    function ConfirmAccountEcComponent(authService, activedRoute) {
        var _this = _super.call(this) || this;
        _this.authService = authService;
        _this.activedRoute = activedRoute;
        _this.ok = false;
        _this.error = false;
        _this.onSuccess = function () {
            _this.ok = true;
        };
        _this.onError = function () {
            _this.error = true;
        };
        _this.ecOnConstruct();
        return _this;
    }
    ConfirmAccountEcComponent.prototype.ngOnInit = function () {
        var token = this.activedRoute.snapshot.queryParams.token;
        this.authService.confirmAccount(token).toPromise().then(this.onSuccess, this.onSuccess).catch(this.onSuccess);
        this.ecOnInit();
    };
    ConfirmAccountEcComponent.ctorParameters = function () { return [
        { type: AuthService },
        { type: ActivatedRoute }
    ]; };
    ConfirmAccountEcComponent = __decorate([
        Component({
            selector: 'app-confirm-account-ec',
            template: "<div class=\"mt-5 mb-5\">\n     <div class=\"row\">\n          <div class=\"col-md-12 col-12 text-center\">\n               <h4 class=\"confirm-title text-white py-3 text-uppercase d-inline-block\">\n                    {{ ('thanks-for-register' | translate) | uppercase }}</h4>\n          </div>\n     </div>\n     \n     \n     <div class=\"row\">\n          <div class=\"col-md-12 col-12 text-center\">\n               <h4>{{ 'thanks-for-register-detail' | translate }}</h4>\n               <br>\n               <a routerLink=\"/auth/login\">\n                    <button class=\"btn bg-golden color-white radius-0\" type=\"button\">{{ 'login' | translate |\n                         uppercase }}</button>\n               </a>\n               <br>\n               <br>\n          </div>\n     </div>\n</div>",
            styles: [".loading-container-form{margin-top:100px;position:absolute;width:100%}.confirm-title{font-size:26px;border-bottom:1px solid #ccc}"]
        })
    ], ConfirmAccountEcComponent);
    return ConfirmAccountEcComponent;
}(ComponentHelper));
export { ConfirmAccountEcComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1hY2NvdW50LWVjLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25nLWVhc3ljb21tZXJjZS8iLCJzb3VyY2VzIjpbImxpYi9lYy1jb21wb25lbnQvYXV0aC1lYy9jb25maXJtLWFjY291bnQtZWMvY29uZmlybS1hY2NvdW50LWVjLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMxQyxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDakQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLG1DQUFtQyxDQUFDO0FBQ3BFLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxnQ0FBZ0MsQ0FBQztBQU83RDtJQUErQyw2Q0FBZTtJQUt6RCxtQ0FBc0IsV0FBd0IsRUFBWSxZ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b3VudCh0b2tlbikudG9Qcm9taXNlKCkudGhlbih0aGlzLm9uU3VjY2VzcywgdGhpcy5vblN1Y2Nlc3MpLmNhdGNoKHRoaXMub25TdWNjZXNzKSAgXG4gICAgICAgIHRoaXMuZWNPbkluaXQoKVxuXG4gICAgIH1cblxuICAgICBvblN1Y2Nlc3MgPSAoKSA9PiB7XG4gICAgICAgICAgdGhpcy5vayA9IHRydWU7XG4gICAgIH1cblxuICAgICBvbkVycm9yID0gKCkgPT4ge1xuICAgICAgICAgIHRoaXMuZXJyb3IgPSB0cnVlO1xuICAgICB9XG59Il19