import { __decorate, __metadata } from "tslib";
import { Component, Input, TemplateRef } from '@angular/core';
/**
 * A full-content container
 */
var KengicFullContentComponent = /** @class */ (function () {
    function KengicFullContentComponent() {
        //region Input
        /** Enable fullscreen functionality or not */
        this.enableFullscreen = true;
        /** Enable open functionality or not */
        this.enableOpen = true;
        this.header = '';
        this.i18n = {};
        //endregion
        //region Field
        /** Whether the query content is visable */
        this.isOpen = false;
        /** Whether in fullscreen mode */
        this.isFullScreen = false;
        //endregion
    }
    //endregion
    //region Method
    KengicFullContentComponent.prototype.handleFullScreenChange = function (full) {
        this.isFullScreen = full;
    };
    KengicFullContentComponent.prototype.toggleOpen = function () {
        this.isOpen = !this.isOpen;
    };
    __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", TemplateRef)
    ], KengicFullContentComponent.prototype, "content", void 0);
    __decorate([
        Input(),
        __metadata("design:type", Object)
    ], KengicFullContentComponent.prototype, "i18n", void 0);
    KengicFullContentComponent = __decorate([
        Component({
            selector: 'kengic-full-content',
            template: "<full-content [padding]=\"10\" (fullscreenChange)=\"handleFullScreenChange($event)\">\r\n  <nz-card [nzTitle]=\"header\" [nzExtra]=\"extraTpl\">\r\n    <ng-container *ngTemplateOutlet=\"isOpen ? content : defaultContent\"></ng-container>\r\n    <ng-template #defaultContent></ng-template>\r\n  </nz-card>\r\n\r\n  <ng-template #extraTpl>\r\n    <button *ngIf=\"enableFullscreen\" nz-button full-toggle [nzType]=\"'default'\" class=\"ml-sm\">\r\n      <i nz-icon [nzType]=\"isFullScreen ? 'fullscreen-exit' : 'fullscreen'\" nzTheme=\"outline\"></i>\r\n      {{ isFullScreen ? i18n?.fullscreenExit || '\u9000\u51FA\u5168\u5C4F' : i18n?.fullscreen || '\u5168\u5C4F' }}\r\n    </button>\r\n\r\n    <i\r\n      *ngIf=\"enableOpen\"\r\n      nz-icon\r\n      [nzType]=\"!isOpen ? 'caret-down' : 'caret-up'\"\r\n      nzTheme=\"outline\"\r\n      class=\"btn-toggle-fullscreen\"\r\n      (click)=\"toggleOpen()\"\r\n    ></i>\r\n  </ng-template>\r\n\r\n  <ng-content></ng-content>\r\n</full-content>\r\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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2VuZ2ljLWZ1bGwtY29udGVudC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Aa2VuZ2ljL2ZlLW5nLyIsInNvdXJjZXMiOlsibGliL2NvbXBvbmVudC9mdWxsLWNvbnRlbnQva2VuZ2ljLWZ1bGwtY29udGVudC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUc5RDs7R0FFRztBQU1IO0lBQUE7UUFDRSxjQUFjO1FBRWQsNkNBQTZDO1FBRXRDLHFCQUFnQixHQUFZLElBQUksQ0FBQ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