import { Component, Injector } from '@angular/core';
import { Router } from '@angular/router';
import { ComponentContextService } from '../../app-context/component-context.service';
import { ComponentBase } from '../../classes/base/component-base';
import { EnumTypeSplash } from '../../enums/common';
import { AuthenService } from '../../services/authen.service';
import { ModuleConfigService } from '../../services/module-config.service';
import { UserService } from '../../services/user.service';
export class NotFoundComponent extends ComponentBase {
    constructor(injector, _router, _userService, _moduleConfigService, _authenService) {
        super(injector);
        this._router = _router;
        this._userService = _userService;
        this._moduleConfigService = _moduleConfigService;
        this._authenService = _authenService;
        this.EnumTypeSplash = EnumTypeSplash;
        this.layoutNotFound = EnumTypeSplash.DEFAULT;
    }
    ngOnInit() {
        this.currentUser = this._userService.getCurrentUser();
        this.environment = this._moduleConfigService.getConfig().environment;
        if (!this.environment.splashScreen || this.environment.splashScreen == '') {
            this.layoutNotFound = EnumTypeSplash.DEFAULT;
        }
        else {
            this.layoutNotFound = this.environment.splashScreen;
        }
    }
    logout() {
        if (!localStorage.getItem('currentUrl')) {
            localStorage.setItem('currentUrl', '/');
        }
        this._authenService.logout();
    }
    goToHome() {
        this._router.navigateByUrl('/');
    }
}
NotFoundComponent.decorators = [
    { type: Component, args: [{
                selector: 'app-not-found',
                template: "<ng-container [ngSwitch]=\"layoutNotFound\">\n    <ng-container *ngSwitchDefault>\n        <ng-container [ngTemplateOutlet]=\"notFoundDefault\">\n        </ng-container>\n    </ng-container>\n</ng-container>\n\n<ng-template #notFoundDefault>\n    <!-- <div style=\"display:flex; align-items:center; justify-content:center;height: calc(100vh - 60px);\">\n        <div class=\"lds-ring\">\n        </div>\n    </div> -->\n    <div class=\"modules\">\n        <div class=\"welcome-user\">\n            <div class=\"profile-image\">\n                <img src=\"/assets/layout/images/male.png\" alt=\"Avatar\" />\n            </div>\n\n            <div class=\"wrp-login\">\n                <h2>Xin ch\u00E0o!</h2>\n                <b>{{currentUser.fullName}}</b>\n                <div class=\"login\">\n                    <a (click)=\"goToHome()\"><i class=\"far fa-folder-open\"></i>Trang ch\u1EE7</a>\n                    <a style=\"background: #fabc01;\" (click)=\"logout()\"><i class=\"far fa-arrow-alt-circle-right\"></i>\u0110\u0103ng\n                        xu\u1EA5t</a>\n                </div>\n            </div>\n            <div class=\"clock-wrapper\">\n            </div>\n        </div>\n\n        <div class=\"module-warning\">\n            <div class=\"title\">\n                <h1>404</h1>\n                <h2>Kh\u00F4ng t\u00ECm th\u1EA5y trang</h2>\n                <p>Trang b\u1EA1n \u0111ang t\u00ECm ki\u1EBFm c\u00F3 th\u1EC3 \u0111\u00E3 b\u1ECB x\u00F3a ho\u1EB7c kh\u00F4ng t\u1ED3n t\u1EA1i.</p>\n            </div>\n        </div>\n    </div>\n</ng-template>",
                providers: [ComponentContextService],
                styles: [".lds-ring{display:inline-block;position:relative;width:80px;height:80px;border:2px solid #bcdbf5;border-top-color:#3192e1;box-sizing:border-box;border-radius:50%;animation:lds-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;background:no-repeat #eff1f6}@keyframes lds-ring{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}body{background-color:#fff}.modules{position:fixed;top:0;left:0;z-index:100;display:flex;justify-content:center;align-items:center;width:100vw;height:100vh;background-image:url(/assets/images/background-splash.png);background-repeat:no-repeat;background-position:50%;background-size:cover}.modules div>span{display:inline-block;min-width:100px;height:120px;width:120px;margin:10px;box-shadow:1px 2px 9px 1px #dadada;border-radius:5px;white-space:normal}.modules div>span>a{height:100%;position:relative;font-weight:700;cursor:pointer;border-radius:5px}.modules div>span>a,.modules div>span>a>span{width:100%;display:inline-block;color:#fff;text-decoration:unset;text-align:center}.modules div>span>a>span{position:absolute;bottom:10px;left:0}.modules div>span.implementing{background-color:#fff;box-shadow:none}.modules div>span>a>i{font-size:3.5em;position:absolute;top:20px;width:100%;left:0}.div1111-wrapper{overflow:auto;height:420px;margin:0 auto;max-width:700px}.div1111-wrapper .div1111{white-space:nowrap;width:100%;display:flex;flex-wrap:wrap}.div1111-wrapper .div1111 .bg-switcher{background:#fff;transition:.3s}.div1111-wrapper .div1111 .bg-switcher .app-switcher-item-icon{color:#52abff;transition:.3s}.div1111-wrapper .div1111 .bg-switcher span{color:#2f70ac;font-weight:500;text-shadow:none;transition:.3s}.div1111-wrapper .div1111 .bg-switcher:hover{background:#facb01;box-shadow:1px 2px 9px 1px rgba(39,23,86,.5215686274509804)}.div1111-wrapper .div1111 .bg-switcher:hover .app-switcher-item-icon,.div1111-wrapper .div1111 .bg-switcher:hover span{color:#2f70ac}.module-warning{text-align:center;color:#666;width:65%;align-self:stretch;background-color:rgba(249,244,244,.9215686274509803);display:flex;flex-direction:column;justify-content:center}.module-warning .title{padding:0 20px}.module-warning img{margin:150px auto}.module-warning h1{color:#2f70ac;font-size:35px;margin-top:0;margin-bottom:0;font-size:200px;font-weight:700;text-shadow:4px 4px 0 #00ffc0;line-height:1;display:inline-block}.module-warning h2{font-size:40px;color:#271756;margin-bottom:0;margin-top:0;text-transform:uppercase}.module-warning p{color:#271756;font-weight:400;margin-top:20px;margin-bottom:25px;font-size:20px;display:inline-block}.welcome-user{text-align:center;width:35%;align-self:stretch;background-color:rgba(47,112,172,.9215686274509803);display:flex;flex-direction:column}.welcome-user .wrp-login{margin:20px auto auto;color:#fff}.welcome-user .wrp-login h2{font-size:20px;margin-top:0;margin-bottom:5px;font-weight:500}.welcome-user .wrp-login b{font-size:25px;text-transform:uppercase;display:block}.welcome-user .wrp-login .login{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));grid-gap:10px;margin-top:30px}.welcome-user .wrp-login .login a{background:#fff;padding:6px;border-radius:5px;cursor:pointer;display:inline-block;color:#5d5d5d}.welcome-user .wrp-login .login a i{margin-right:10px}.welcome-user .profile-image{margin:auto auto 0}.welcome-user .profile-image img{border-radius:50%;height:200px;width:200px;-o-object-fit:contain;object-fit:contain;box-shadow:1px 1px 11px 6px #2a659b;background:#fff}.welcome-user .clock-wrapper{color:#fff;text-align:center;margin-top:auto;margin-bottom:auto}.welcome-user .clock-wrapper h4{font-size:18px;font-weight:500;margin-top:10px}.welcome-user .clock-wrapper h1{margin-bottom:0;font-size:40px}@media (max-width:1368px){.clock{margin:0 20px;font-size:1.5em}.data-time{margin:10px 0 20px;font-size:1em}}@media (max-width:768px){.modules{flex-direction:column}.welcome-user{width:100%;height:25%;flex-direction:row;align-items:center}.welcome-user .profile-image{margin-bottom:auto}.welcome-user .profile-image img{height:150px;width:150px}.welcome-user .wrp-login{margin-top:auto}.welcome-user .wrp-login .login{margin-top:20px}.welcome-user .clock-wrapper{display:none}.module-warning{width:100%;height:75%}}@media (max-width:640px){.welcome-user .wrp-login{width:50%;padding:0 20px 0 0;float:right}.welcome-user .wrp-login h2{margin-bottom:3px;font-size:14px}.welcome-user .wrp-login b{font-size:14px}.welcome-user .wrp-login .login{margin-top:10px;display:flex;flex-direction:column;padding:0 15px;text-align:left}.welcome-user .wrp-login .login a{font-size:14px}.welcome-user .profile-image{width:50%;float:left}.welcome-user .profile-image img{height:130px;width:130px;margin-left:35px;display:block}.welcome-user .clock-wrapper{clear:both;padding-top:10px;padding-right:0}.welcome-user .clock-wrapper h4{font-size:14px;margin-top:5px}.welcome-user .clock-wrapper h1{font-size:1.3em}.module-warning .div1111-wrapper{max-width:360px;margin-top:0;height:360px}.module-warning .div1111-wrapper .div1111 .bg-switcher span{font-size:14px}.module-warning div>span{width:100px;height:100px}.module-warning div>span>a>i{font-size:2.5em;top:10px}}@media (max-width:425px){.module-warning h2{font-size:28px}}@media (max-width:375px){.module-warning h2{font-size:26px}}"]
            },] }
];
NotFoundComponent.ctorParameters = () => [
    { type: Injector },
    { type: Router },
    { type: UserService },
    { type: ModuleConfigService },
    { type: AuthenService }
];
//# sourceMappingURL=data:application/json;base64, 