import { ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core';
import { I18nService } from 'ng-devui/i18n';
import * as i0 from "@angular/core";
import * as i1 from "ng-devui/i18n";
import * as i2 from "@angular/common";
import * as i3 from "ng-devui/icon";
export class ModalHeaderComponent {
    constructor(ref, i18n) {
        this.ref = ref;
        this.i18n = i18n;
        this.dialogtype = 'standard';
        this.closeEvent = new EventEmitter();
    }
    get checkDialogType() {
        return this.dialogtype?.toLowerCase() || 'standard';
    }
    ngOnInit() {
        this.i18nText = this.i18n.getI18nText().modal;
        this.i18nSubscription = this.i18n.langChange().subscribe((data) => {
            this.i18nText = data.modal;
            this.ref.markForCheck();
        });
    }
    close(event) {
        this.closeEvent.emit(event);
    }
    ngOnDestroy() {
        if (this.i18nSubscription) {
            this.i18nSubscription.unsubscribe();
        }
    }
}
ModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ModalHeaderComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.I18nService }], target: i0.ɵɵFactoryTarget.Component });
ModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ModalHeaderComponent, selector: "d-modal-header", inputs: { title: "title", dialogtype: "dialogtype", showCloseBtn: "showCloseBtn" }, outputs: { closeEvent: "closeEvent" }, ngImport: i0, template: "<div class=\"modal-header\" [ngClass]=\"{ 'no-title': !title && title !== '' && checkDialogType === 'standard' }\">\n  <div class=\"standard-title\">\n    <div *ngIf=\"checkDialogType === 'warning'\" class=\"header-alert-icon\">\n      <svg\n        class=\"devui-icon devui-icon-warning\"\n        viewBox=\"0 0 16 16\"\n        version=\"1.1\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n      >\n        <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n          <polygon\n            points=\"7.5 1.74501946 1.39184847 13.5954649 7.08947368 14.2207621 13.9973698 13.5954649 10.9383683 5.61273879 8.40084114 1.27624313\"\n          ></polygon>\n          <path\n            d=\"M8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 Z M8.87894737,11.2105263 L7.08947368,11.2105263 L7.08947368,13 L8.87894737,13 L8.87894737,11.2105263 Z M8.96842105,4.5 L7,4.5 L7.08947368,9.86842105 L8.87894737,9.86842105 L8.96842105,4.5 Z\"\n          ></path>\n        </g>\n      </svg>\n    </div>\n    <div *ngIf=\"checkDialogType === 'failed'\" class=\"header-alert-icon\">\n      <svg\n        class=\"devui-icon devui-icon-error\"\n        width=\"16px\"\n        height=\"16px\"\n        viewBox=\"0 0 16 16\"\n        version=\"1.1\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n      >\n        <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n          <circle cx=\"8\" cy=\"8\" r=\"7\"></circle>\n          <path\n            d=\"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,12.6 L7,12.6 L7,10.6 L9,10.6 L9,12.6 Z M9,9.1 L7,9.1 L6.9,3.1 L9.1,3.1 L9,9.1 Z\"\n            fill-rule=\"nonzero\"\n          ></path>\n        </g>\n      </svg>\n    </div>\n    <div *ngIf=\"checkDialogType === 'sucess' || checkDialogType === 'success'\" class=\"header-alert-icon\">\n      <svg\n        class=\"devui-icon devui-icon-success\"\n        viewBox=\"0 0 16 16\"\n        version=\"1.1\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n      >\n        <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n          <circle cx=\"8\" cy=\"8\" r=\"7\"></circle>\n          <path d=\"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z\" fill-rule=\"nonzero\"></path>\n          <polygon\n            stroke-width=\"0.4\"\n            fill-rule=\"nonzero\"\n            points=\"8.16 10.48 7.32 11.32 6.48 10.48 6.48 10.48 3.6 7.68 4.44 6.84 7.28 9.68 11.52 5.44 12.36 6.28\"\n          ></polygon>\n        </g>\n      </svg>\n    </div>\n    <div *ngIf=\"checkDialogType === 'info'\" class=\"header-alert-icon\">\n      <svg\n        class=\"devui-icon devui-icon-info\"\n        viewBox=\"0 0 16 16\"\n        version=\"1.1\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n      >\n        <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n          <circle cx=\"8\" cy=\"8\" r=\"7\"></circle>\n          <g stroke-width=\"1\">\n            <path\n              d=\"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,5 L7,5 L7,3 L9,3 L9,5 Z M9,12.6 L7,12.6 L7,6.6 L9,6.6 L9,12.6 Z\"\n            ></path>\n          </g>\n        </g>\n      </svg>\n    </div>\n    <span *ngIf=\"title\" [title]=\"title\" class=\"title-text\">{{ title }}</span>\n    <ng-container *ngIf=\"!title\">\n      <span *ngIf=\"checkDialogType === 'warning'\" class=\"title-text\"> {{ i18nText?.warning }}</span>\n      <span *ngIf=\"checkDialogType === 'failed'\" class=\"title-text\">{{ i18nText?.error }}</span>\n      <span *ngIf=\"checkDialogType === 'sucess' || checkDialogType === 'success'\" class=\"title-text\">{{ i18nText?.success }}</span>\n      <span *ngIf=\"checkDialogType === 'info'\" class=\"title-text\">{{ i18nText?.info }}</span>\n    </ng-container>\n  </div>\n  <d-icon class=\"modal-header-close\" *ngIf=\"showCloseBtn\" [icon]=\"closeTemplate\" [operable]=\"true\" (click)=\"close($event)\"> </d-icon>\n  <ng-template #closeTemplate>\n    <svg\n      width=\"16px\"\n      height=\"16px\"\n      viewBox=\"0 0 16 16\"\n      version=\"1.1\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    >\n      <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n        <path\n          d=\"M14.6887175,1.25368865 C15.0770801,1.64205125 15.0121881,2.34244569 14.544513,2.81012074 L9.383,7.971 L14.544513,13.1322854 C14.9787827,13.5665551 15.0657548,14.2014859 14.7650189,14.6009195 L14.6887175,14.6887175 C14.3003549,15.0770801 13.5999604,15.0121881 13.1322854,14.544513 L13.1322854,14.544513 L7.971,9.383 L2.81012075,14.544513 C2.3424457,15.0121881 1.64205125,15.0770801 1.25368865,14.6887175 C0.865326051,14.3003549 0.930218063,13.5999605 1.39789313,13.1322854 L6.558,7.971 L1.39789311,2.81012074 C0.963623424,2.37585105 0.876651354,1.74092026 1.17738727,1.34148668 L1.25368865,1.25368865 C1.64205125,0.865326051 2.34244569,0.930218063 2.81012074,1.39789311 L2.81012074,1.39789311 L7.971,6.558 L13.1322854,1.39789311 C13.5999605,0.930218063 14.3003549,0.865326051 14.6887175,1.25368865 Z\"\n          id=\"\u5F62\u72B6\u7ED3\u5408\"\n          fill=\"#8A8E99\"\n          fill-rule=\"nonzero\"\n        ></path>\n      </g>\n    </svg>\n  </ng-template>\n</div>\n", styles: [".devui-font-size-base{font-size:12px;font-size:var(--devui-font-size, 12px)}.devui-font-base{font-size:12px;font-size:var(--devui-font-size, 12px);font-weight:400;line-height:1.5}.devui-font-size-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-font-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);font-weight:700;line-height:1.5}.devui-font-size-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px)}.devui-font-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px);font-weight:700;line-height:1.5}.devui-font-size-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px)}.devui-font-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700;line-height:1.5}.modal-header{padding:20px 20px 0;position:relative;border:none}.modal-header .standard-title{height:26px;line-height:26px;color:#252b3a;color:var(--devui-text, #252b3a);letter-spacing:0;font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.modal-header.no-title{height:0;padding:0}.modal-header.no-title .standard-title{display:none}.header-alert-icon{display:inline-block;vertical-align:middle;margin-right:8px;width:24px;height:24px;line-height:16px;text-align:center}.header-alert-icon .devui-icon{width:24px;height:24px}.header-alert-icon .devui-icon circle,.header-alert-icon .devui-icon polygon{fill:#fff;fill:var(--devui-light-text, #ffffff)}.header-alert-icon .devui-icon.devui-icon-success path{fill:#50d4ab;fill:var(--devui-success, #50d4ab)}.header-alert-icon .devui-icon.devui-icon-warning path{fill:#fa9841;fill:var(--devui-warning-line, #fa9841)}.header-alert-icon .devui-icon.devui-icon-info path{fill:#5e7ce0;fill:var(--devui-info, #5e7ce0)}.header-alert-icon .devui-icon.devui-icon-error path{fill:#f66f6a;fill:var(--devui-danger, #f66f6a)}.title-text{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);font-weight:700;vertical-align:middle}.modal-header-close{position:absolute;right:20px;top:18px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.IconComponent, selector: "d-icon", inputs: ["icon", "operable", "disabled", "rotate", "color"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ModalHeaderComponent, decorators: [{
            type: Component,
            args: [{ selector: 'd-modal-header', preserveWhitespaces: false, template: "<div class=\"modal-header\" [ngClass]=\"{ 'no-title': !title && title !== '' && checkDialogType === 'standard' }\">\n  <div class=\"standard-title\">\n    <div *ngIf=\"checkDialogType === 'warning'\" class=\"header-alert-icon\">\n      <svg\n        class=\"devui-icon devui-icon-warning\"\n        viewBox=\"0 0 16 16\"\n        version=\"1.1\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n      >\n        <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n          <polygon\n            points=\"7.5 1.74501946 1.39184847 13.5954649 7.08947368 14.2207621 13.9973698 13.5954649 10.9383683 5.61273879 8.40084114 1.27624313\"\n          ></polygon>\n          <path\n            d=\"M8.51325441,0.127397589 C8.70423071,0.228333932 8.8605922,0.383286648 8.96244623,0.57254229 L15.8714442,13.4101975 C16.1549662,13.9370117 15.9538562,14.5918482 15.4222523,14.8728158 C15.2642579,14.9563203 15.0879506,15 14.9088903,15 L1.09089441,15 C0.488410063,15 0,14.5159904 0,13.9189343 C0,13.7414873 0.0440768395,13.5667684 0.128340519,13.4101975 L7.03733844,0.57254229 C7.32086049,0.0457280838 7.98165058,-0.153569987 8.51325441,0.127397589 Z M8.87894737,11.2105263 L7.08947368,11.2105263 L7.08947368,13 L8.87894737,13 L8.87894737,11.2105263 Z M8.96842105,4.5 L7,4.5 L7.08947368,9.86842105 L8.87894737,9.86842105 L8.96842105,4.5 Z\"\n          ></path>\n        </g>\n      </svg>\n    </div>\n    <div *ngIf=\"checkDialogType === 'failed'\" class=\"header-alert-icon\">\n      <svg\n        class=\"devui-icon devui-icon-error\"\n        width=\"16px\"\n        height=\"16px\"\n        viewBox=\"0 0 16 16\"\n        version=\"1.1\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n      >\n        <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n          <circle cx=\"8\" cy=\"8\" r=\"7\"></circle>\n          <path\n            d=\"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,12.6 L7,12.6 L7,10.6 L9,10.6 L9,12.6 Z M9,9.1 L7,9.1 L6.9,3.1 L9.1,3.1 L9,9.1 Z\"\n            fill-rule=\"nonzero\"\n          ></path>\n        </g>\n      </svg>\n    </div>\n    <div *ngIf=\"checkDialogType === 'sucess' || checkDialogType === 'success'\" class=\"header-alert-icon\">\n      <svg\n        class=\"devui-icon devui-icon-success\"\n        viewBox=\"0 0 16 16\"\n        version=\"1.1\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n      >\n        <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n          <circle cx=\"8\" cy=\"8\" r=\"7\"></circle>\n          <path d=\"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z\" fill-rule=\"nonzero\"></path>\n          <polygon\n            stroke-width=\"0.4\"\n            fill-rule=\"nonzero\"\n            points=\"8.16 10.48 7.32 11.32 6.48 10.48 6.48 10.48 3.6 7.68 4.44 6.84 7.28 9.68 11.52 5.44 12.36 6.28\"\n          ></polygon>\n        </g>\n      </svg>\n    </div>\n    <div *ngIf=\"checkDialogType === 'info'\" class=\"header-alert-icon\">\n      <svg\n        class=\"devui-icon devui-icon-info\"\n        viewBox=\"0 0 16 16\"\n        version=\"1.1\"\n        xmlns=\"http://www.w3.org/2000/svg\"\n        xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n      >\n        <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n          <circle cx=\"8\" cy=\"8\" r=\"7\"></circle>\n          <g stroke-width=\"1\">\n            <path\n              d=\"M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M9,5 L7,5 L7,3 L9,3 L9,5 Z M9,12.6 L7,12.6 L7,6.6 L9,6.6 L9,12.6 Z\"\n            ></path>\n          </g>\n        </g>\n      </svg>\n    </div>\n    <span *ngIf=\"title\" [title]=\"title\" class=\"title-text\">{{ title }}</span>\n    <ng-container *ngIf=\"!title\">\n      <span *ngIf=\"checkDialogType === 'warning'\" class=\"title-text\"> {{ i18nText?.warning }}</span>\n      <span *ngIf=\"checkDialogType === 'failed'\" class=\"title-text\">{{ i18nText?.error }}</span>\n      <span *ngIf=\"checkDialogType === 'sucess' || checkDialogType === 'success'\" class=\"title-text\">{{ i18nText?.success }}</span>\n      <span *ngIf=\"checkDialogType === 'info'\" class=\"title-text\">{{ i18nText?.info }}</span>\n    </ng-container>\n  </div>\n  <d-icon class=\"modal-header-close\" *ngIf=\"showCloseBtn\" [icon]=\"closeTemplate\" [operable]=\"true\" (click)=\"close($event)\"> </d-icon>\n  <ng-template #closeTemplate>\n    <svg\n      width=\"16px\"\n      height=\"16px\"\n      viewBox=\"0 0 16 16\"\n      version=\"1.1\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n    >\n      <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n        <path\n          d=\"M14.6887175,1.25368865 C15.0770801,1.64205125 15.0121881,2.34244569 14.544513,2.81012074 L9.383,7.971 L14.544513,13.1322854 C14.9787827,13.5665551 15.0657548,14.2014859 14.7650189,14.6009195 L14.6887175,14.6887175 C14.3003549,15.0770801 13.5999604,15.0121881 13.1322854,14.544513 L13.1322854,14.544513 L7.971,9.383 L2.81012075,14.544513 C2.3424457,15.0121881 1.64205125,15.0770801 1.25368865,14.6887175 C0.865326051,14.3003549 0.930218063,13.5999605 1.39789313,13.1322854 L6.558,7.971 L1.39789311,2.81012074 C0.963623424,2.37585105 0.876651354,1.74092026 1.17738727,1.34148668 L1.25368865,1.25368865 C1.64205125,0.865326051 2.34244569,0.930218063 2.81012074,1.39789311 L2.81012074,1.39789311 L7.971,6.558 L13.1322854,1.39789311 C13.5999605,0.930218063 14.3003549,0.865326051 14.6887175,1.25368865 Z\"\n          id=\"\u5F62\u72B6\u7ED3\u5408\"\n          fill=\"#8A8E99\"\n          fill-rule=\"nonzero\"\n        ></path>\n      </g>\n    </svg>\n  </ng-template>\n</div>\n", styles: [".devui-font-size-base{font-size:12px;font-size:var(--devui-font-size, 12px)}.devui-font-base{font-size:12px;font-size:var(--devui-font-size, 12px);font-weight:400;line-height:1.5}.devui-font-size-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-font-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);font-weight:700;line-height:1.5}.devui-font-size-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px)}.devui-font-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px);font-weight:700;line-height:1.5}.devui-font-size-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px)}.devui-font-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700;line-height:1.5}.modal-header{padding:20px 20px 0;position:relative;border:none}.modal-header .standard-title{height:26px;line-height:26px;color:#252b3a;color:var(--devui-text, #252b3a);letter-spacing:0;font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.modal-header.no-title{height:0;padding:0}.modal-header.no-title .standard-title{display:none}.header-alert-icon{display:inline-block;vertical-align:middle;margin-right:8px;width:24px;height:24px;line-height:16px;text-align:center}.header-alert-icon .devui-icon{width:24px;height:24px}.header-alert-icon .devui-icon circle,.header-alert-icon .devui-icon polygon{fill:#fff;fill:var(--devui-light-text, #ffffff)}.header-alert-icon .devui-icon.devui-icon-success path{fill:#50d4ab;fill:var(--devui-success, #50d4ab)}.header-alert-icon .devui-icon.devui-icon-warning path{fill:#fa9841;fill:var(--devui-warning-line, #fa9841)}.header-alert-icon .devui-icon.devui-icon-info path{fill:#5e7ce0;fill:var(--devui-info, #5e7ce0)}.header-alert-icon .devui-icon.devui-icon-error path{fill:#f66f6a;fill:var(--devui-danger, #f66f6a)}.title-text{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);font-weight:700;vertical-align:middle}.modal-header-close{position:absolute;right:20px;top:18px}\n"] }]
        }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.I18nService }]; }, propDecorators: { title: [{
                type: Input
            }], dialogtype: [{
                type: Input
            }], showCloseBtn: [{
                type: Input
            }], closeEvent: [{
                type: Output
            }] } });
//# sourceMappingURL=data:application/json;base64, 