import { __decorate, __metadata } from "tslib";
import { Component, Input, TemplateRef } from '@angular/core';
/**
 * A full-content container
 */
let KengicFullContentComponent = class KengicFullContentComponent {
    constructor() {
        //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
    handleFullScreenChange(full) {
        this.isFullScreen = full;
    }
    toggleOpen() {
        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);
export { KengicFullContentComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2VuZ2ljLWZ1bGwtY29udGVudC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Aa2VuZ2ljL2ZlLW5nLyIsInNvdXJjZXMiOlsibGliL2NvbXBvbmVudC9mdWxsLWNvbnRlbnQva2VuZ2ljLWZ1bGwtY29udGVudC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUc5RDs7R0FFRztBQU1ILElBQWEsMEJBQTBCLEdBQXZDLE1BQWEsMEJBQTBCO0lBQXZDO1FBQ0UsY0FBYztRQUVkLDZDQUE2QztRQUV0QyxxQkFBZ0IsR0FBWSxJQUFJLENBQUM7UUFFeEMsdUNBQXVDO1FBRWhDLGVBQV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