import { __decorate, __metadata } from "tslib";
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';
import { coerceBoolean } from '@angular-ru/cdk/coercion';
import { AttributeBoolean } from '@angular-ru/cdk/decorators';
import { TableContentDirective } from '../../directives/table-content.directive';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
export class NgxHeaderComponent extends TableContentDirective {
    constructor() {
        super(...arguments);
        this.expandedChange = new EventEmitter();
        this.expanded = true;
        this.expandablePanel = false;
        this.hideToggle = false;
    }
    toggleExpand() {
        this.expanded = !coerceBoolean(this.expanded);
        this.expandedChange.emit(this.expanded);
    }
}
/** @nocollapse */ NgxHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: NgxHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
/** @nocollapse */ NgxHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: NgxHeaderComponent, selector: "ngx-header", inputs: { expanded: "expanded", expandablePanel: "expandablePanel", hideToggle: "hideToggle" }, outputs: { expandedChange: "expandedChange" }, usesInheritance: true, ngImport: i0, template: "<div\n    class=\"table-grid__table-content-place\"\n    [class.table-grid__header-expandable]=\"expandablePanel\"\n    [class.table-grid__table-content-place--content-cell]=\"contentCell !== null\"\n    [class.table-grid__table-content-place--align-center]=\"alignCenter !== null\"\n    [class.table-grid__table-content-place--bold]=\"bold !== null\"\n    [style.height.px]=\"height\"\n>\n    <div\n        [ngClass]=\"cssClasses\"\n        [class.content-box]=\"contentCell !== null\"\n    >\n        <ng-content></ng-content>\n    </div>\n    <ng-container *ngIf=\"expandablePanel && !hideToggle\">\n        <div class=\"table-grid__header-sticky--expand-button-wrapper\">\n            <svg\n                xmlns=\"http://www.w3.org/2000/svg\"\n                viewBox=\"0 0 24 24\"\n                class=\"table-grid__header-sticky--expand-button\"\n                [class.table-grid__header-sticky--expand-button--expanded]=\"expanded\"\n                (click)=\"toggleExpand()\"\n            >\n                <path\n                    d=\"M0 0h24v24H0V0z\"\n                    fill=\"none\"\n                />\n                <path d=\"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\" />\n            </svg>\n        </div>\n    </ng-container>\n</div>\n", directives: [{ type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
__decorate([
    AttributeBoolean(),
    __metadata("design:type", Object)
], NgxHeaderComponent.prototype, "expanded", void 0);
__decorate([
    AttributeBoolean(),
    __metadata("design:type", Object)
], NgxHeaderComponent.prototype, "expandablePanel", void 0);
__decorate([
    AttributeBoolean(),
    __metadata("design:type", Object)
], NgxHeaderComponent.prototype, "hideToggle", void 0);
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: NgxHeaderComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ngx-header', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div\n    class=\"table-grid__table-content-place\"\n    [class.table-grid__header-expandable]=\"expandablePanel\"\n    [class.table-grid__table-content-place--content-cell]=\"contentCell !== null\"\n    [class.table-grid__table-content-place--align-center]=\"alignCenter !== null\"\n    [class.table-grid__table-content-place--bold]=\"bold !== null\"\n    [style.height.px]=\"height\"\n>\n    <div\n        [ngClass]=\"cssClasses\"\n        [class.content-box]=\"contentCell !== null\"\n    >\n        <ng-content></ng-content>\n    </div>\n    <ng-container *ngIf=\"expandablePanel && !hideToggle\">\n        <div class=\"table-grid__header-sticky--expand-button-wrapper\">\n            <svg\n                xmlns=\"http://www.w3.org/2000/svg\"\n                viewBox=\"0 0 24 24\"\n                class=\"table-grid__header-sticky--expand-button\"\n                [class.table-grid__header-sticky--expand-button--expanded]=\"expanded\"\n                (click)=\"toggleExpand()\"\n            >\n                <path\n                    d=\"M0 0h24v24H0V0z\"\n                    fill=\"none\"\n                />\n                <path d=\"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z\" />\n            </svg>\n        </div>\n    </ng-container>\n</div>\n" }]
        }], propDecorators: { expandedChange: [{
                type: Output
            }], expanded: [{
                type: Input
            }], expandablePanel: [{
                type: Input
            }], hideToggle: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 