/**
 * @fileoverview added by tsickle
 * Generated from: lib/layout/rs-header/index.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// 组件类
import { Component, EventEmitter, Input, Output, } from "@angular/core";
import { TranslationService } from "../../service/translation.service";
import { getTranslation } from "../../utils/utils";
export class RSHeaderComponent {
    /**
     * @param {?} translationService
     */
    constructor(translationService) {
        this.translationService = translationService;
        this.isCollapsed = false; // 接收输入属性
        // 接收输入属性
        this.lastLoginTime = new Date();
        this.appName = "";
        this.toggleMenu = new EventEmitter();
        this.changeLanguage = new EventEmitter();
        this._langOptions = [];
    }
    /**
     * @param {?} options
     * @return {?}
     */
    set langOptions(options) {
        this._langOptions = options;
        if (options && options.length > 0) {
            /** @type {?} */
            const languageCode = localStorage.getItem("language") || "en";
            this.currentLang = options.find((/**
             * @param {?} e
             * @return {?}
             */
            (e) => e.languageCode === languageCode));
        }
    }
    /**
     * @return {?}
     */
    get langOptions() {
        return this._langOptions;
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        this.translation = getTranslation();
    }
    /**
     * @param {?=} isCollapsed
     * @return {?}
     */
    onToggleMenu(isCollapsed) {
        /** @type {?} */
        const collapseState = isCollapsed !== undefined ? isCollapsed : !this.isCollapsed;
        this.toggleMenu.emit(collapseState);
    }
    /**
     * @param {?} event
     * @return {?}
     */
    selectLanguage(event) {
        this.currentLang = this.langOptions.find((/**
         * @param {?} item
         * @return {?}
         */
        (item) => item.text === event.item.text));
        this.changeLanguage.emit(this.currentLang.languageCode);
    }
}
RSHeaderComponent.decorators = [
    { type: Component, args: [{
                selector: "rs-header",
                template: "<div class=\"rs-header\">\r\n  <div class=\"logo-wrap\">\r\n    <div class=\"toggle-menu-wrap\">\r\n      <svg\r\n        class=\"toggle-menu\"\r\n        (click)=\"onToggleMenu()\"\r\n        width=\"24\"\r\n        height=\"31\"\r\n        viewBox=\"0 0 24 31\"\r\n        fill=\"none\"\r\n        xmlns=\"http://www.w3.org/2000/svg\"\r\n      >\r\n        <line x1=\"4\" y1=\"9.5\" x2=\"20\" y2=\"9.5\" stroke=\"#6C7C90\" />\r\n        <line x1=\"4\" y1=\"21.5\" x2=\"20\" y2=\"21.5\" stroke=\"#6C7C90\" />\r\n        <line x1=\"4\" y1=\"15.5\" x2=\"20\" y2=\"15.5\" stroke=\"#6C7C90\" />\r\n      </svg>\r\n    </div>\r\n    <img\r\n      class=\"logo\"\r\n      src=\"../../../assets/img/raise_logo_main_new.svg\"\r\n      alt=\"logo\"\r\n    />\r\n    <!-- <svg\r\n      width=\"87\"\r\n      height=\"35\"\r\n      viewBox=\"0 0 87 35\"\r\n      fill=\"none\"\r\n      xmlns=\"http://www.w3.org/2000/svg\"\r\n    >\r\n      <g clip-path=\"url(#clip0_13700_1713)\">\r\n        <path\r\n          d=\"M36.32 29.029L34.6405 24.7835H26.2706L24.6825 29.029H18.9998L28.0712 7.39929H33.1416L42.1238 29.0267H36.32V29.029ZM30.5161 13.1735L27.7673 20.5974H33.2055L30.5161 13.1735Z\"\r\n          fill=\"#15477F\"\r\n        />\r\n        <path\r\n          d=\"M43.9265 29.0289V10.5548H49.182V29.0289H43.9265Z\"\r\n          fill=\"#15477F\"\r\n        />\r\n        <path\r\n          d=\"M65.065 13.0203C64.6171 12.4514 64.0299 11.9966 63.3078 11.6608C62.5857 11.3249 61.8865 11.1558 61.2147 11.1558C60.8674 11.1558 60.5178 11.1855 60.1614 11.2472C59.8049 11.3089 59.485 11.4254 59.1994 11.5991C58.9138 11.7727 58.6738 11.9966 58.4819 12.2708C58.2877 12.545 58.1917 12.8969 58.1917 13.3242C58.1917 13.6898 58.2671 13.996 58.4202 14.2405C58.5733 14.485 58.7972 14.6998 59.092 14.8826C59.3868 15.0654 59.7386 15.2345 60.1454 15.3876C60.5521 15.5407 61.0114 15.6983 61.5209 15.8606C62.2544 16.1051 63.0176 16.3747 63.8128 16.6694C64.608 16.9642 65.33 17.3572 65.9812 17.8462C66.6325 18.3352 67.1717 18.9407 67.6013 19.6628C68.0286 20.3848 68.2434 21.2874 68.2434 22.3659C68.2434 23.609 68.0149 24.6829 67.5556 25.5878C67.0963 26.4949 66.4816 27.2421 65.707 27.8339C64.9324 28.4257 64.0481 28.8621 63.0496 29.1478C62.0511 29.4334 61.0228 29.5751 59.9649 29.5751C58.4179 29.5751 56.919 29.3054 55.4749 28.7662C54.0285 28.2269 52.8266 27.4569 51.8691 26.4606L55.2898 22.9783C55.8199 23.6295 56.5168 24.1756 57.3828 24.6121C58.2488 25.0508 59.108 25.2679 59.9649 25.2679C60.351 25.2679 60.728 25.2267 61.0959 25.1445C61.4615 25.0622 61.7837 24.9297 62.0579 24.7469C62.3321 24.5641 62.5515 24.3196 62.7137 24.0134C62.8759 23.7072 62.9582 23.3416 62.9582 22.9143C62.9582 22.487 62.8554 22.1603 62.652 21.8747C62.4486 21.589 62.1584 21.3308 61.7814 21.0955C61.4044 20.8624 60.936 20.6476 60.3762 20.4534C59.8163 20.2592 59.1788 20.0512 58.4659 19.8273C57.7736 19.6034 57.0949 19.3383 56.4345 19.0321C55.7719 18.7259 55.1824 18.3352 54.6637 17.8554C54.145 17.3778 53.7268 16.7974 53.4115 16.1142C53.0962 15.431 52.9385 14.6015 52.9385 13.6236C52.9385 12.4217 53.183 11.3934 53.672 10.5388C54.161 9.68424 54.8031 8.98046 55.596 8.43206C56.3911 7.88138 57.2869 7.47922 58.2831 7.22559C59.2816 6.97195 60.2893 6.84399 61.3084 6.84399C62.5309 6.84399 63.7785 7.06792 65.0512 7.51578C66.324 7.96364 67.4391 8.62629 68.3965 9.50144L65.0672 13.0135L65.065 13.0203Z\"\r\n          fill=\"#15477F\"\r\n        />\r\n        <path\r\n          d=\"M71.6938 29.029V7.39929H86.2355V11.7979H76.7345V15.8903H85.7168V20.0764H76.7345V24.5664H86.7862V29.0267H71.6961L71.6938 29.029Z\"\r\n          fill=\"#15477F\"\r\n        />\r\n        <path\r\n          d=\"M1.96738 29.0267H4.97671L8.19168 25.8117L11.4067 29.0267H18.9974L8.18483 18.2141L5.37658 21.0224V12.7759H12.6109C12.8645 12.7759 12.9673 12.9564 12.9993 13.0364C13.0313 13.114 13.0884 13.3151 12.9079 13.4934L10.2436 16.1577L14.0161 19.9302L16.0383 17.908L17.8183 16.1279C19.0294 14.597 19.3173 12.5862 18.5518 10.7354C17.6995 8.6766 15.787 7.39929 13.5591 7.39929H0V29.0267H1.96738Z\"\r\n          fill=\"#15477F\"\r\n        />\r\n        <path d=\"M43.9265 9.36433H49.1797V5L43.9265 9.36433Z\" fill=\"#F68D1E\" />\r\n      </g>\r\n      <defs>\r\n        <clipPath id=\"clip0_13700_1713\">\r\n          <rect width=\"86.7839\" height=\"34.5751\" fill=\"white\" />\r\n        </clipPath>\r\n      </defs>\r\n    </svg> -->\r\n\r\n    <div *ngIf=\"appName\" class=\"header-app-name\">{{ appName }}</div>\r\n  </div>\r\n  <div class=\"content-header-wrap\">\r\n    <div class=\"bread-crumbs-wrap\">\r\n      <ng-content select=\"[breadCrumbs]\"></ng-content>\r\n    </div>\r\n    <div class=\"rs-header-toolbar-wrap\">\r\n      <div class=\"quick-icon-group\">\r\n        <ng-content select=\"[toolbar]\"></ng-content>\r\n      </div>\r\n      <div class=\"line\"></div>\r\n      <div class=\"langulage-wrap\">\r\n        <button\r\n          class=\"e-btn text\"\r\n          ejs-dropdownbutton\r\n          [items]=\"langOptions\"\r\n          (select)=\"selectLanguage($event)\"\r\n        >\r\n          {{ currentLang && currentLang.text }}\r\n        </button>\r\n      </div>\r\n      <!-- <div class=\"line\"></div>\r\n      <div class=\"last-login-wrap\">\r\n        {{ translation?.LAST_LOGIN || \"Last Login\" }}:\r\n        {{ lastLoginTime | date : \"dd MMM yy h:mm a\" }}\r\n      </div> -->\r\n      <div class=\"line\"></div>\r\n      <div class=\"user-info-wrap\">\r\n        <ng-content select=\"[userInfo]\"></ng-content>\r\n      </div>\r\n    </div>\r\n  </div>\r\n</div>\r\n",
                styles: [".rs-header{height:50px;background-color:var(--rs-container-bg);display:flex;justify-content:space-between}.rs-header .logo-wrap{width:240px;display:flex;padding:12px 0 0 20px;align-items:center;gap:12px}.rs-header .logo-wrap .toggle-menu-wrap{cursor:pointer;display:flex;align-items:center}.rs-header .logo-wrap .toggle-menu-wrap:hover{background:#1364b30d;border-radius:6px}.rs-header .logo-wrap .logo{width:77px;height:32px}.rs-header .logo-wrap .header-app-name{font-size:24px;color:#15477f;margin-left:6px;margin-top:-8px}@media (max-width:1200px){.rs-header .logo-wrap{width:auto}}.rs-header .content-header-wrap{display:flex;justify-content:space-between;align-items:center;flex:1;max-width:1886px;margin:0 auto}.rs-header .bread-crumbs-wrap{padding-left:16px}.rs-header .rs-header-toolbar-wrap,.rs-header .rs-header-toolbar-wrap .quick-icon-group{display:flex;align-items:center}.rs-header .rs-header-toolbar-wrap .quick-icon-group ::ng-deep .header-icon{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:8px;cursor:pointer}.rs-header .rs-header-toolbar-wrap .quick-icon-group ::ng-deep .header-icon:last-child{margin-right:16px}.rs-header .rs-header-toolbar-wrap .quick-icon-group ::ng-deep .header-icon svg{width:24px;height:24px;color:#6c7c90;stroke:#6c7c90}.rs-header .rs-header-toolbar-wrap .quick-icon-group ::ng-deep .header-icon:hover{border-radius:4px;background:rgba(31,123,255,.04)}.rs-header .rs-header-toolbar-wrap .quick-icon-group ::ng-deep .header-icon:hover svg{color:#1f7bff;stroke:#1f7bff}.rs-header .rs-header-toolbar-wrap .line{width:1px;height:24px;background-color:var(--rs-border-color)}.rs-header .rs-header-toolbar-wrap .langulage-wrap{padding:0 16px}.rs-header .rs-header-toolbar-wrap .last-login-wrap{padding:0 16px;color:var(--rs-labels-color);font-size:11px;font-weight:400;line-height:1}.rs-header .rs-header-toolbar-wrap .user-info-wrap{padding:0 20px 0 16px}"]
            }] }
];
/** @nocollapse */
RSHeaderComponent.ctorParameters = () => [
    { type: TranslationService }
];
RSHeaderComponent.propDecorators = {
    isCollapsed: [{ type: Input }],
    lastLoginTime: [{ type: Input }],
    appName: [{ type: Input }],
    langOptions: [{ type: Input }],
    toggleMenu: [{ type: Output }],
    changeLanguage: [{ type: Output }]
};
if (false) {
    /** @type {?} */
    RSHeaderComponent.prototype.isCollapsed;
    /** @type {?} */
    RSHeaderComponent.prototype.lastLoginTime;
    /** @type {?} */
    RSHeaderComponent.prototype.appName;
    /** @type {?} */
    RSHeaderComponent.prototype.toggleMenu;
    /** @type {?} */
    RSHeaderComponent.prototype.changeLanguage;
    /**
     * @type {?}
     * @private
     */
    RSHeaderComponent.prototype._langOptions;
    /** @type {?} */
    RSHeaderComponent.prototype.currentLang;
    /** @type {?} */
    RSHeaderComponent.prototype.translation;
    /** @type {?} */
    RSHeaderComponent.prototype.translationService;
}
//# sourceMappingURL=data:application/json;base64, 