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