import { Component, Injector, Input } from '@angular/core';
import { ComponentContextService } from '../../app-context/component-context.service';
import { ComponentBase } from '../../classes/base/component-base';
export class CommonDashboardComponent extends ComponentBase {
    constructor(_injector) {
        super(_injector);
        this.appSwitcher = {};
        this.greeting = 'Chào mừng bạn đến với';
    }
    ngOnInit() {
        this.appSwitcher = this.rootContext.data.currentAppMetadata;
    }
    goHome() {
        this.rootContext.fireEvent('GO_HOME');
    }
}
CommonDashboardComponent.decorators = [
    { type: Component, args: [{
                selector: 'app-common-dashboard',
                template: "<div class=\"common-dashboard\">\n    <div class=\"icon\">\n        <i class=\"{{appSwitcher.icon}}\" [style.color]=\"appSwitcher.colorIcon\"\n            [style.background-color]=\"appSwitcher.background\"></i>\n    </div>\n    <div class=\"greeting\" [style.color]=\"appSwitcher.background\">\n        <div class=\"greeting-title\">{{greeting}}</div>\n        <div class=\"long-title\">{{appSwitcher.longTitle}}</div>\n    </div>\n    <div class=\"back\" (click)=\"goHome()\">\n        <i class=\"fas fa-undo\"></i> Quay l\u1EA1i trang ch\u1EE7\n    </div>\n</div>\n",
                providers: [ComponentContextService],
                styles: ["::ng-deep .common-dashboard{width:100%;height:66.7ch;display:flex;flex-direction:column;justify-content:center;align-items:center}::ng-deep .common-dashboard .icon>i{font-size:40px;padding:10px;border-radius:5px}::ng-deep .common-dashboard .greeting{display:flex;flex-direction:column;padding:20px 0;border-radius:5px}::ng-deep .common-dashboard .greeting>div{display:flex;justify-content:center;align-items:center;text-align:center}::ng-deep .common-dashboard .greeting .greeting-title{font-size:25px;padding-bottom:10px}::ng-deep .common-dashboard .greeting .long-title{font-size:30px;padding-left:5px;font-weight:700;text-transform:uppercase}::ng-deep .common-dashboard .back{font-size:14px;color:#397ac3;opacity:.85;cursor:pointer}::ng-deep .common-dashboard .back:hover{opacity:1}@media (max-width:640px){.common-dashboard .greeting{padding:15px 0}.common-dashboard .greeting .greeting-title{font-size:16px}.common-dashboard .greeting .long-title{font-size:20px;padding:0}}"]
            },] }
];
CommonDashboardComponent.ctorParameters = () => [
    { type: Injector }
];
CommonDashboardComponent.propDecorators = {
    appSwitcher: [{ type: Input }],
    greeting: [{ type: Input }]
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLWRhc2hib2FyZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90bngtc2hhcmVkL3NyYy9saWIvY29tcG9uZW50cy9jb21tb24tZGFzaGJvYXJkL2NvbW1vbi1kYXNoYm9hcmQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsUUFBUSxFQUFFLEtBQUssRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUNuRSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSw2Q0FBNkMsQ0FBQztBQUN0RixPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFTbEUsTUFBTSxPQUFPLHdCQUF5QixTQUFRLGFBQWE7SUFRdkQsWUFDSSxTQUFtQjtRQUVuQixLQUFLLENBQUMsU0FBUyxDQUFDLENBQUM7UUFUWixnQkFBVyxHQUFRLEVBQUUsQ0FBQztRQUV0QixhQUFRLEdBQVcsdUJBQXVCLENBQUM7SUFTcEQsQ0FBQztJQUVELFFBQVE7UUFDSixJQUFJLENBQUMsV0FBVyxHQUFHLElBQUksQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDO0lBQ2hFLENBQUM7SUFFRCxNQUFNO1FBQ0YsSUFBSSxDQUFDLFdBQVcsQ0FBQyxTQUFTLENBQUMsU0FBUyxDQUFDLENBQUM7SUFDMUMsQ0FBQzs7O1lBM0JKLFNBQVMsU0FBQztnQkFDUCxRQUFRLEVBQUUsc0JBQXNCO2dCQUNoQyxva0JBQWdEO2dC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