import { __decorate, __metadata } from "tslib";
import { Component, Input, TemplateRef } from '@angular/core';
/**
 * A full-content container
 */
var KengicFullContentComponent = /** @class */ (function () {
    function KengicFullContentComponent() {
        /** Enable fullscreen functionality or not */
        this.enableFullscreen = true;
        /** Enable open functionality or not */
        this.enableOpen = true;
        this.header = '';
        this.i18n = {};
        /** Whether in fullscreen mode */
        this.isFullScreen = false;
        /** Whether the query content is visable */
        this.isOpen = false;
    }
    KengicFullContentComponent.prototype.handleFullScreenChange = function (full) {
        this.isFullScreen = full;
    };
    KengicFullContentComponent.prototype.toggleOpen = function () {
        this.isOpen = !this.isOpen;
    };
    __decorate([
        Input(),
        __metadata("design:type", TemplateRef)
    ], KengicFullContentComponent.prototype, "content", void 0);
    __decorate([
        Input(),
        __metadata("design:type", Boolean)
    ], KengicFullContentComponent.prototype, "enableFullscreen", void 0);
    __decorate([
        Input(),
        __metadata("design:type", Boolean)
    ], KengicFullContentComponent.prototype, "enableOpen", void 0);
    __decorate([
        Input(),
        __metadata("design:type", Object)
    ], KengicFullContentComponent.prototype, "header", void 0);
    __decorate([
        Input(),
        __metadata("design:type", Object)
    ], KengicFullContentComponent.prototype, "i18n", void 0);
    KengicFullContentComponent = __decorate([
        Component({
            selector: 'kengic-full-content',
            template: "<full-content (fullscreenChange)=\"handleFullScreenChange($event)\" [padding]=\"10\">\n  <nz-card [nzExtra]=\"extraTpl\" [nzTitle]=\"header\">\n    <ng-container *ngTemplateOutlet=\"isOpen ? content : defaultContent\"></ng-container>\n    <ng-template #defaultContent></ng-template>\n  </nz-card>\n\n  <ng-template #extraTpl>\n    <button *ngIf=\"enableFullscreen\" [nzType]=\"'default'\" class=\"ml-sm\" full-toggle nz-button>\n      <i [nzType]=\"isFullScreen ? 'fullscreen-exit' : 'fullscreen'\" nz-icon nzTheme=\"outline\"></i>\n      {{ isFullScreen ? i18n?.fullscreenExit || '\u9000\u51FA\u5168\u5C4F' : i18n?.fullscreen || '\u5168\u5C4F' }}\n    </button>\n\n    <i (click)=\"toggleOpen()\" *ngIf=\"enableOpen\" [nzType]=\"!isOpen ? 'caret-down' : 'caret-up'\" class=\"btn-toggle-fullscreen\" nz-icon nzTheme=\"outline\"></i>\n  </ng-template>\n\n  <ng-content></ng-content>\n</full-content>\n",
            styles: ["::ng-deep .ant-card-extra{padding:5px 0}::ng-deep .ant-card-extra .btn-toggle-fullscreen.anticon{margin-left:10px;cursor:pointer;font-size:18px;vertical-align:middle}::ng-deep .ant-card-extra .btn-toggle-fullscreen.anticon.anticon-caret-up{margin-top:-3px}::ng-deep .ant-card-extra .btn-toggle-fullscreen.anticon:hover{color:#40a9ff}::ng-deep .ant-card-head{min-height:auto;padding:0 10px 0 5px;background:#fafafa}::ng-deep .ant-card-head-title{padding:5px 0}::ng-deep .ant-card-body{padding:0}::ng-deep .ant-card-body .ant-form-item{margin-bottom:5px}"]
        })
    ], KengicFullContentComponent);
    return KengicFullContentComponent;
}());
export { KengicFullContentComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2VuZ2ljLWZ1bGwtY29udGVudC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Aa2VuZ2ljL2ZlLW5nLyIsInNvdXJjZXMiOlsibGliL2NvbXBvbmVudC9mdWxsLWNvbnRlbnQva2VuZ2ljLWZ1bGwtY29udGVudC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUc5RDs7R0FFRztBQU1IO0lBQUE7UUFHRSw2Q0FBNkM7UUFFdEMscUJBQWdCLEdBQVksSUFBSSxDQUFDO1FBQ3hDLHVDQUF1QztRQUVoQyxlQUFVLEdBQVksSUFBSSxDQUFDO1FBRTNCLFdBQU0sR0FBK0IsRUFBRSxDQUFDO1FBRXhDLFNBQUksR0FBb0MsRUFBRSx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