/* eslint-disable @angular-eslint/component-selector */
import { Component, Input } from '@angular/core';
import { NgStyle } from '@angular/common';
import { TooltipDirective } from '@seniorsistemas/angular-components/tooltip';
import * as i0 from "@angular/core";
export class SideTableComponent {
    columnTitle;
    tasks;
    multipleTaskPerLine = false;
    ROW_HEIGHT = 44;
    ngOnInit() {
        this._removeEmptyTasks();
    }
    _removeEmptyTasks() {
        this.tasks = this.tasks.filter((task) => task.tasks.length);
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SideTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SideTableComponent, isStandalone: true, selector: "gantt-side-table", inputs: { columnTitle: "columnTitle", tasks: "tasks", multipleTaskPerLine: "multipleTaskPerLine" }, ngImport: i0, template: "<div class=\"side-table\">\n    <div class=\"column-title\">\n        <span>{{ columnTitle }}</span>\n    </div>\n    <div class=\"tasks\" >\n        @for(task of tasks; track task.id; let i = $index) {\n            <div\n                class=\"task\"\n                [ngStyle]=\"{'height.px': multipleTaskPerLine\n                        ? ROW_HEIGHT\n                        : ROW_HEIGHT * task.tasks.length}\"\n                [sTooltip]=\"task.title.length > 20 || task.subtitle.length > 20 ? '<span><strong>' + task.title + ' </strong></br><span> ' + task.subtitle + ' </span></span>' : '' \"\n                [escape]=\"false\">\n                    <div class=\"title\">\n                        {{ task.title }}\n                    </div>\n                    <div class=\"subtitle\">\n                        {{ task.subtitle }}\n                    </div>\n            </div>\n        }\n    </div>\n</div>\n", styles: [".side-table{background:#fff;height:100%;min-width:175px}.side-table .column-title{height:106px;border:solid 1px #e0e0e0;box-sizing:border-box;display:flex;align-items:flex-end;justify-content:center;padding:8px}.side-table .column-title span{font-family:\"Open Sans\" sans-serif;font-size:14px;font-weight:700;line-height:150%}.side-table .task{align-items:center;background-color:#fff;border:solid 1px #e0e0e0;display:flex;flex-direction:column;font-family:Open Sans,sans-serif;font-weight:400;justify-content:center;line-height:150%;padding:0 5px}.side-table .task .title{color:#333;font-size:14px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-table .task .subtitle{color:#999;font-size:12px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: TooltipDirective, selector: "[sTooltip]", inputs: ["sTooltip", "tooltipPosition", "showDelay", "displayTime", "tooltipEvent", "escape", "visible", "mobileBehavior", "focusedInputRef", "checkTruncatedText"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SideTableComponent, decorators: [{
            type: Component,
            args: [{ selector: 'gantt-side-table', standalone: true, imports: [NgStyle, TooltipDirective], template: "<div class=\"side-table\">\n    <div class=\"column-title\">\n        <span>{{ columnTitle }}</span>\n    </div>\n    <div class=\"tasks\" >\n        @for(task of tasks; track task.id; let i = $index) {\n            <div\n                class=\"task\"\n                [ngStyle]=\"{'height.px': multipleTaskPerLine\n                        ? ROW_HEIGHT\n                        : ROW_HEIGHT * task.tasks.length}\"\n                [sTooltip]=\"task.title.length > 20 || task.subtitle.length > 20 ? '<span><strong>' + task.title + ' </strong></br><span> ' + task.subtitle + ' </span></span>' : '' \"\n                [escape]=\"false\">\n                    <div class=\"title\">\n                        {{ task.title }}\n                    </div>\n                    <div class=\"subtitle\">\n                        {{ task.subtitle }}\n                    </div>\n            </div>\n        }\n    </div>\n</div>\n", styles: [".side-table{background:#fff;height:100%;min-width:175px}.side-table .column-title{height:106px;border:solid 1px #e0e0e0;box-sizing:border-box;display:flex;align-items:flex-end;justify-content:center;padding:8px}.side-table .column-title span{font-family:\"Open Sans\" sans-serif;font-size:14px;font-weight:700;line-height:150%}.side-table .task{align-items:center;background-color:#fff;border:solid 1px #e0e0e0;display:flex;flex-direction:column;font-family:Open Sans,sans-serif;font-weight:400;justify-content:center;line-height:150%;padding:0 5px}.side-table .task .title{color:#333;font-size:14px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.side-table .task .subtitle{color:#999;font-size:12px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"] }]
        }], propDecorators: { columnTitle: [{
                type: Input,
                args: [{ required: true }]
            }], tasks: [{
                type: Input,
                args: [{ required: true }]
            }], multipleTaskPerLine: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2lkZS10YWJsZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWNvbXBvbmVudHMvZ2FudHQvc3JjL2xpYi9nYW50dC9jb21wb25lbnRzL3NpZGUtdGFibGUvc2lkZS10YWJsZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWNvbXBvbmVudHMvZ2FudHQvc3JjL2xpYi9nYW50dC9jb21wb25lbnRzL3NpZGUtdGFibGUvc2lkZS10YWJsZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFHekQsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzFDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLDRDQUE0QyxDQUFDOztBQVM5RSxNQUFNLE9BQU8sa0JBQWtCO0lBRXBCLFdBQVcsQ0FBVTtJQUdyQixLQUFLLENBQWU7SUFHcEIsbUJBQW1CLEdBQUcsS0FBSyxDQUFDO0lBRTVCLFVBQVUsR0FBRyxFQUFFLENBQU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GFuPnt7IGNvbHVtblRpdGxlIH19PC9zcGFuPlxuICAgIDwvZGl2PlxuICAgIDxkaXYgY2xhc3M9XCJ0YXNrc1wiID5cbiAgICAgICAgQGZvcih0YXNrIG9mIHRhc2tzOyB0cmFjayB0YXNrLmlkOyBsZXQgaSA9ICRpbmRleCkge1xuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIGNsYXNzPVwidGFza1wiXG4gICAgICAgICAgICAgICAgW25nU3R5bGVdPVwieydoZWlnaHQucHgnOiBtdWx0aXBsZVRhc2tQZXJMaW5lXG4gICAgICAgICAgICAgICAgICAgICAgICA/IFJPV19IRUlHSFRcbiAgICAgICAgICAgICAgICAgICAgICAgIDogUk9XX0hFSUdIVCAqIHRhc2sudGFza3MubGVuZ3RofVwiXG4gICAgICAgICAgICAgICAgW3NUb29sdGlwXT1cInRhc2sudGl0bGUubGVuZ3RoID4gMjAgfHwgdGFzay5zdWJ0aXRsZS5sZW5ndGggPiAyMCA/ICc8c3Bhbj48c3Ryb25nPicgKyB0YXNrLnRpdGxlICsgJyA8L3N0cm9uZz48L2JyPjxzcGFuPiAnICsgdGFzay5zdWJ0aXRsZSArICcgPC9zcGFuPjwvc3Bhbj4nIDogJycgXCJcbiAgICAgICAgICAgICAgICBbZXNjYXBlXT1cImZhbHNlXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0aXRsZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAge3sgdGFzay50aXRsZSB9fVxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInN1YnRpdGxlXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICB7eyB0YXNrLnN1YnRpdGxlIH19XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgIH1cbiAgICA8L2Rpdj5cbjwvZGl2PlxuIl19