import { Input, Output, EventEmitter, ViewChild, HostBinding, ElementRef, ChangeDetectorRef, Component, ChangeDetectionStrategy, Injector } from '@angular/core';
import { BehaviorSubject, defer, fromEvent, Subject } from 'rxjs';
import { debounceTime, takeUntil, tap } from 'rxjs/operators';
import { isNullOrUndefined, isUndefined } from '@ironsource/fusion-ui/utils';
import { TableService } from '@ironsource/fusion-ui/components/table/common/services';
import { UniqueIdService } from '@ironsource/fusion-ui/services/unique-id';
import { TableColumnTypeEnum, CONFIG_TABLE_BY_UI_STYLE, ROW_CLICK_SUPPRESS_FOR_PARENT_SELECTORS } from '@ironsource/fusion-ui/components/table/common/entities';
import { TableBasicComponent } from './components/table-basic/table-basic.component';
import { FormControl } from '@angular/forms';
import { TableTestIdModifiers } from '@ironsource/fusion-ui/entities';
import { TestIdsService } from '@ironsource/fusion-ui/services/test-ids';
import * as i0 from "@angular/core";
import * as i1 from "@ironsource/fusion-ui/components/table/common/services";
import * as i2 from "@ironsource/fusion-ui/services/unique-id";
import * as i3 from "@angular/common";
import * as i4 from "@ironsource/fusion-ui/components/icon/v1";
import * as i5 from "@ironsource/fusion-ui/components/checkbox/v2";
import * as i6 from "@ironsource/fusion-ui/components/multi-dropdown/v2";
import * as i7 from "@ironsource/fusion-ui/components/tooltip/v3";
import * as i8 from "@angular/forms";
import * as i9 from "@ironsource/fusion-ui/components/search";
import * as i10 from "./components/table-basic/table-basic.component";
import * as i11 from "./components/table-empty/table-empty.component";
import * as i12 from "./components/table-grouped/table-grouped.component";
import * as i13 from "./components/table-loading/table-loading.component";
import * as i14 from "@ironsource/fusion-ui/pipes/generic";
const _c0 = ["stringCell"];
const _c1 = ["checkboxCell"];
const _c2 = ["templateCell"];
const _c3 = ["table"];
const _c4 = ["tableWrapper"];
const _c5 = ["tableBody"];
const _c6 = () => ({ iconName: "info", iconVersion: "v3" });
function TableComponent_div_0_ng_container_1_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelement(1, "fusion-icon", 11);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const tableLabel_r9 = i0.ɵɵnextContext().ngIf;
    let tmp_1_0;
    i0.ɵɵadvance();
    i0.ɵɵproperty("fusionTooltip", tableLabel_r9.tooltip)("name", (tmp_1_0 = tableLabel_r9.icon) !== null && tmp_1_0 !== undefined ? tmp_1_0 : i0.ɵɵpureFunction0(2, _c6));
} }
function TableComponent_div_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 10);
    i0.ɵɵpipe(2, "generic");
    i0.ɵɵtext(3);
    i0.ɵɵtemplate(4, TableComponent_div_0_ng_container_1_ng_container_4_Template, 2, 3, "ng-container", 4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const tableLabel_r9 = ctx.ngIf;
    const ctx_r7 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵattribute("data-testid", i0.ɵɵpipeBind3(2, 3, ctx_r7.testIdsService.getTestAttribute.bind(ctx_r7), ctx_r7.testId, ctx_r7.tableTestIdModifiers.LABEL));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("", tableLabel_r9.text, " ");
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", tableLabel_r9.tooltip);
} }
function TableComponent_div_0_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 12);
    i0.ɵɵelement(1, "fusion-search", 13);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const searchOptions_r12 = ctx.ngIf;
    const ctx_r8 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("formControl", ctx_r8.searchFormControl)("placeholder", searchOptions_r12.placeholder)("testId", ctx_r8.testId);
} }
function TableComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8);
    i0.ɵɵtemplate(1, TableComponent_div_0_ng_container_1_Template, 5, 7, "ng-container", 4)(2, TableComponent_div_0_div_2_Template, 2, 3, "div", 9);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.options == null ? null : ctx_r0.options.tableLabel);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.options == null ? null : ctx_r0.options.searchOptions);
} }
function TableComponent_table_3_ng_container_2_thead_1_tr_1_td_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 24);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const subheader_r25 = ctx.$implicit;
    const isFirst_r26 = ctx.first;
    const ctx_r24 = i0.ɵɵnextContext(5);
    i0.ɵɵclassProp("fu-border-left", !isFirst_r26);
    i0.ɵɵattribute("colspan", isFirst_r26 && !!(ctx_r24.options == null ? null : ctx_r24.options.rowsExpandableOptions) ? subheader_r25.colspan + 1 : subheader_r25.colspan);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", subheader_r25.name, " ");
} }
function TableComponent_table_3_ng_container_2_thead_1_tr_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵtemplate(1, TableComponent_table_3_ng_container_2_thead_1_tr_1_td_1_Template, 2, 4, "td", 23);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r22 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngForOf", ctx_r22.subHeader);
} }
function TableComponent_table_3_ng_container_2_thead_1_td_3_fusion_multi_dropdown_11_Template(rf, ctx) { if (rf & 1) {
    const _r35 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-multi-dropdown", 32);
    i0.ɵɵlistener("selectedChange", function TableComponent_table_3_ng_container_2_thead_1_td_3_fusion_multi_dropdown_11_Template_fusion_multi_dropdown_selectedChange_0_listener($event) { i0.ɵɵrestoreView(_r35); const column_r27 = i0.ɵɵnextContext().$implicit; const ctx_r33 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r33.filterColumn(column_r27, $event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const column_r27 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("selected", column_r27.filter.selected)("options", column_r27.filter.options)("confirm", true)("search", true);
} }
function TableComponent_table_3_ng_container_2_thead_1_td_3_fusion_checkbox_12_Template(rf, ctx) { if (rf & 1) {
    const _r38 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-checkbox", 33);
    i0.ɵɵlistener("changed", function TableComponent_table_3_ng_container_2_thead_1_td_3_fusion_checkbox_12_Template_fusion_checkbox_changed_0_listener($event) { i0.ɵɵrestoreView(_r38); const ctx_r37 = i0.ɵɵnextContext(5); return i0.ɵɵresetView(ctx_r37.tableService.onRowsSelectChanged(ctx_r37.options.isGroupedTable, ctx_r37.rows, $event)); });
    i0.ɵɵpipe(1, "generic");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r32 = i0.ɵɵnextContext(5);
    i0.ɵɵproperty("checked", ctx_r32.tableService.isAllRowsSelected(ctx_r32.rows))("isIndeterminate", ctx_r32.tableService.isPartialSelected(ctx_r32.rows))("name", "rows_all");
    i0.ɵɵattribute("data-testid", i0.ɵɵpipeBind3(1, 4, ctx_r32.testIdsService.getTestAttribute.bind(ctx_r32), ctx_r32.testId, ctx_r32.tableTestIdModifiers.COLUMN_HEADER_SELECT_ALL));
} }
function TableComponent_table_3_ng_container_2_thead_1_td_3_Template(rf, ctx) { if (rf & 1) {
    const _r40 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "td", 25);
    i0.ɵɵlistener("click", function TableComponent_table_3_ng_container_2_thead_1_td_3_Template_td_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r40); const column_r27 = restoredCtx.$implicit; const ctx_r39 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r39.onHeaderClicked(column_r27)); });
    i0.ɵɵpipe(1, "generic");
    i0.ɵɵelementContainerStart(2);
    i0.ɵɵelementStart(3, "div", 26);
    i0.ɵɵpipe(4, "generic");
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "div", 27);
    i0.ɵɵelement(7, "div", 28);
    i0.ɵɵpipe(8, "generic");
    i0.ɵɵelement(9, "div", 29);
    i0.ɵɵpipe(10, "generic");
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
    i0.ɵɵtemplate(11, TableComponent_table_3_ng_container_2_thead_1_td_3_fusion_multi_dropdown_11_Template, 1, 4, "fusion-multi-dropdown", 30)(12, TableComponent_table_3_ng_container_2_thead_1_td_3_fusion_checkbox_12_Template, 2, 8, "fusion-checkbox", 31);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const column_r27 = ctx.$implicit;
    const isLast_r28 = ctx.last;
    const isFirst_r29 = ctx.first;
    const idx_r30 = ctx.index;
    const ctx_r23 = i0.ɵɵnextContext(4);
    i0.ɵɵstyleProp("width", ctx_r23.tableService.setWidth(isLast_r28, column_r27.width))("text-align", column_r27.headerAlign)("top", ctx_r23.options == null ? null : ctx_r23.options.stickyHeaderTopOffset, "px");
    i0.ɵɵproperty("ngClass", ctx_r23.tableService.getColumnClasses(column_r27, true))("ngStyle", ctx_r23.tableService.getColumnStyle(column_r27));
    i0.ɵɵattribute("data-col-key", column_r27.key)("colspan", isFirst_r29 ? ctx_r23.tableService.expandLevels + 1 : undefined)("data-testid", i0.ɵɵpipeBind3(1, 20, ctx_r23.testIdsService.getTestAttribute.bind(ctx_r23), ctx_r23.testId, ctx_r23.tableTestIdModifiers.COLUMN_HEADER + idx_r30));
    i0.ɵɵadvance(3);
    i0.ɵɵclassProp("fu-tooltiped", column_r27.tooltip);
    i0.ɵɵproperty("fusionTooltip", column_r27.tooltip);
    i0.ɵɵattribute("data-testid", i0.ɵɵpipeBind3(4, 24, ctx_r23.testIdsService.getTestAttribute.bind(ctx_r23), ctx_r23.testId, ctx_r23.tableTestIdModifiers.COLUMN_TITLE + idx_r30));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(column_r27.title);
    i0.ɵɵadvance(2);
    i0.ɵɵattribute("data-testid", i0.ɵɵpipeBind3(8, 28, ctx_r23.testIdsService.getTestAttribute.bind(ctx_r23), ctx_r23.testId, ctx_r23.tableTestIdModifiers.COLUMN_SORT_UP + idx_r30));
    i0.ɵɵadvance(2);
    i0.ɵɵattribute("data-testid", i0.ɵɵpipeBind3(10, 32, ctx_r23.testIdsService.getTestAttribute.bind(ctx_r23), ctx_r23.testId, ctx_r23.tableTestIdModifiers.COLUMN_SORT_DOWN + idx_r30));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", column_r27.filter && column_r27.filter.options);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r23.tableService.isTypeCheckbox(column_r27) && ctx_r23.isAllRowsSelectable && !ctx_r23.isEmpty && ctx_r23.isCheckboxTitleShown);
} }
function TableComponent_table_3_ng_container_2_thead_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "thead", 20);
    i0.ɵɵtemplate(1, TableComponent_table_3_ng_container_2_thead_1_tr_1_Template, 2, 1, "tr", 4);
    i0.ɵɵelementStart(2, "tr", 21);
    i0.ɵɵtemplate(3, TableComponent_table_3_ng_container_2_thead_1_td_3_Template, 13, 36, "td", 22);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r17 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("hidden", (ctx_r17.isEmpty || ctx_r17.loading && !ctx_r17.isLoadingOverlay) && ctx_r17.hideHeaderOnEmpty);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r17.subHeader.length);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngStyle", !!ctx_r17.options.rowsOptions && !!ctx_r17.options.rowsOptions.headerRow ? ctx_r17.options.rowsOptions.headerRow.style : null);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngForOf", ctx_r17.columns)("ngForTrackBy", ctx_r17.trackByFunc);
} }
function TableComponent_table_3_ng_container_2_tbody_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "tbody", 34);
} if (rf & 2) {
    const ctx_r18 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("fusionTableLoading", ctx_r18.colsCount);
} }
function TableComponent_table_3_ng_container_2_tbody_3_Template(rf, ctx) { if (rf & 1) {
    const _r43 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tbody", 35, 36);
    i0.ɵɵlistener("rowSelected", function TableComponent_table_3_ng_container_2_tbody_3_Template_tbody_rowSelected_0_listener($event) { i0.ɵɵrestoreView(_r43); const ctx_r42 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r42.selectionChanged.emit($event)); })("expandRow", function TableComponent_table_3_ng_container_2_tbody_3_Template_tbody_expandRow_0_listener($event) { i0.ɵɵrestoreView(_r43); const ctx_r44 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r44.doExpandRow($event)); })("click", function TableComponent_table_3_ng_container_2_tbody_3_Template_tbody_click_0_listener($event) { i0.ɵɵrestoreView(_r43); const ctx_r45 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r45.onTableBodyClicked($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r19 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("rows", ctx_r19.tableRows)("columns", ctx_r19.columns)("options", ctx_r19.options)("tableClientWidth", ctx_r19.getTableClientWidth())("expandedRows", ctx_r19.expandedRows)("testId", ctx_r19.testId);
} }
function TableComponent_table_3_ng_container_2_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelement(1, "tbody", 34);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r20 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance();
    i0.ɵɵproperty("fusionTableLoading", ctx_r20.colsCount);
} }
function TableComponent_table_3_ng_container_2_tbody_5_Template(rf, ctx) { if (rf & 1) {
    const _r47 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tbody", 37);
    i0.ɵɵlistener("rowSelected", function TableComponent_table_3_ng_container_2_tbody_5_Template_tbody_rowSelected_0_listener($event) { i0.ɵɵrestoreView(_r47); const ctx_r46 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r46.selectionChanged.emit($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r21 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("rows", ctx_r21.groupedTableRows)("columns", ctx_r21.columns)("options", ctx_r21.options);
} }
function TableComponent_table_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, TableComponent_table_3_ng_container_2_thead_1_Template, 4, 5, "thead", 17)(2, TableComponent_table_3_ng_container_2_tbody_2_Template, 1, 1, "tbody", 16)(3, TableComponent_table_3_ng_container_2_tbody_3_Template, 2, 6, "tbody", 18)(4, TableComponent_table_3_ng_container_2_ng_container_4_Template, 2, 1, "ng-container", 4)(5, TableComponent_table_3_ng_container_2_tbody_5_Template, 1, 3, "tbody", 19);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r14 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r14.columns.length);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r14.loading && !ctx_r14.isLoadingOverlay);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", !ctx_r14.options.isGroupedTable && (!ctx_r14.loading || ctx_r14.isLoadingOverlay) && !ctx_r14.isEmpty);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", (ctx_r14.options == null ? null : ctx_r14.options.pagination) && ctx_r14.options.pagination.loading);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r14.options.isGroupedTable && (!ctx_r14.loading || ctx_r14.isLoadingOverlay) && !ctx_r14.isEmpty);
} }
function TableComponent_table_3_tbody_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "tbody", 38);
} if (rf & 2) {
    const ctx_r15 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("fusionTableEmpty", ctx_r15.colsCount)("customContent", ctx_r15.options == null ? null : ctx_r15.options.customNoData)("header", ctx_r15.noDataMessage)("subHeader", ctx_r15.noDataSubMessage)("icon", ctx_r15.options == null ? null : ctx_r15.options.emptyTableIcon)("imageBackgroundUrl", ctx_r15.options == null ? null : ctx_r15.options.noDataImageBgUrl);
} }
function TableComponent_table_3_tbody_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "tbody", 34);
} if (rf & 2) {
    const ctx_r16 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("fusionTableLoading", ctx_r16.colsCount);
} }
function TableComponent_table_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "table", 5, 14);
    i0.ɵɵtemplate(2, TableComponent_table_3_ng_container_2_Template, 6, 5, "ng-container", 4)(3, TableComponent_table_3_tbody_3_Template, 1, 6, "tbody", 15)(4, TableComponent_table_3_tbody_4_Template, 1, 1, "tbody", 16);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("id", ctx_r2.id);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r2.columns && ctx_r2.options);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", !ctx_r2.loading && ctx_r2.isEmpty);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r2.isEmpty && ctx_r2.loading);
} }
const _c7 = () => ({ iconName: "angle-up", iconVersion: "v3" });
function TableComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
    const _r49 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 39);
    i0.ɵɵlistener("click", function TableComponent_ng_container_4_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r49); const ctx_r48 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r48.onClickReturnTop()); });
    i0.ɵɵpipe(2, "generic");
    i0.ɵɵelement(3, "fusion-icon", 40);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵattribute("data-testid", i0.ɵɵpipeBind3(2, 2, ctx_r3.testIdsService.getTestAttribute.bind(ctx_r3), ctx_r3.testId, ctx_r3.tableTestIdModifiers.BUTTON_GO_TOP));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("name", i0.ɵɵpureFunction0(6, _c7));
} }
function TableComponent_div_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "div", 41);
} }
function TableComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 42);
    i0.ɵɵelement(1, "span");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const isSubHeader_r50 = ctx.$implicit;
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵstyleProp("top", ctx_r5.options == null ? null : ctx_r5.options.stickyHeaderTopOffset, "px");
    i0.ɵɵclassProp("fu-header-group", isSubHeader_r50)("sticky-left", ctx_r5.options == null ? null : ctx_r5.options.rowsExpandableOptions == null ? null : ctx_r5.options.rowsExpandableOptions.sticky);
} }
export class TableComponent {
    /**
     * Table Options (configuration)
     * @param value: TableOptions
     */
    set options(value) {
        if (!isNullOrUndefined(value)) {
            this._options = value;
            this.tableService.hasRowspanRows = value.hasRowSpan ?? false;
            this.tableService.rowsExpandableKey = value.rowsExpandableOptions?.key;
        }
    }
    get options() {
        return this._options;
    }
    /**
     * Table columns configuration
     * columns: TableColumn[]
     */
    set columns(value) {
        if (Array.isArray(value)) {
            this._columns = value;
            this.subHeader = this.getSubHeaders(this._columns);
        }
    }
    /**
     * Table rows data
     * rows: {[key: string]: any}[]
     */
    set rows(value) {
        if (Array.isArray(value)) {
            this._rows = this.tableService.setRowsMetadata([...value]);
            this.initRows();
        }
    }
    /** @internal */
    set expandedRows(value) {
        this.onExternalExpandRowChanged(value);
        this._expandedRows = value;
    }
    get isFixedHeader() {
        return !isNullOrUndefined(this.options) && !isNullOrUndefined(this.options.stickyHeader) && this.options.stickyHeader;
    }
    get noTableFrame() {
        return !(!!this.options?.tableLabel || !!this.options?.searchOptions);
    }
    get noTableFooter() {
        return !this.noTableFrame && this.options?.noTableFooter;
    }
    get isEmpty() {
        return this.tableService.isTableEmpty(this.rows, this.options.isGroupedTable, this.options.hasTotalsRow);
    }
    get isLoading() {
        return this.loading;
    }
    get onVerticalScroll() {
        if (this.tableWrapperElement) {
            return this.tableWrapperElement.nativeElement.scrollTop > 0;
        }
    }
    get isCheckboxTitleShown() {
        return this.columns ? this.columns.some(column => column.type === TableColumnTypeEnum.Checkbox && column.title !== '') : false;
    }
    get isLoadingOverlay() {
        return (isNullOrUndefined(this.options) || // default - true
            isNullOrUndefined(this.options.isLoadingOverlayMode) || // default - true
            this.options.isLoadingOverlayMode // get from options
        );
    }
    get tableRows() {
        return this.rows;
    }
    get groupedTableRows() {
        return this.rows;
    }
    get colsCount() {
        let columnsCount = Array.isArray(this.columns) ? this.columns.length : 1;
        if (!!this.options && this.options.rowsExpandableOptions) {
            columnsCount += !!this.options.rowsExpandableOptions.expandLevels ? this.options.rowsExpandableOptions.expandLevels : 1;
        }
        return columnsCount;
    }
    get expandedRows() {
        return this._expandedRows;
    }
    get scrollElement() {
        const scrollElement = this.tableWrapperElement.nativeElement;
        if (this.options.scrollElementSelector) {
            return document.querySelector(this.options.scrollElementSelector) || scrollElement;
        }
        return scrollElement;
    }
    get rows() {
        return this._rows;
    }
    get columns() {
        return this._columns;
    }
    constructor(
    /** @internal */
    tableService, uniqueService, cdr, injector) {
        this.tableService = tableService;
        this.uniqueService = uniqueService;
        this.cdr = cdr;
        this.injector = injector;
        /** @internal */
        this.sortTableOnDataChanges = false;
        /**
         * On Sort changed
         */
        this.sortChanged = new EventEmitter();
        /**
         * On rows selection changed
         */
        this.selectionChanged = this.tableService.selectionChanged;
        /**
         * On Row model (data) changed
         */
        this.rowModelChange = this.tableService.rowModelChange;
        /**
         * On Row clicked
         */
        this.rowClicked = new EventEmitter();
        /**
         * On scroll down. Used for get new paged data portion
         */
        this.scrollDown = new EventEmitter();
        /**
         * On Row action clicked
         */
        this.rowActionClicked = this.tableService.rowActionClicked;
        /**
         * on expand icon clicked. No need in case static data and one expand level
         * @internal
         */
        this.expandRow = new EventEmitter();
        /**
         * two-way binding for expandedRows map used in case no expandRow subscription in host for sync this value
         * @internal
         */
        this.expandedRowsChange = new EventEmitter();
        /** @internal */
        this.isRowsInit = false;
        /** @internal */
        this.tableMainError = false;
        /** @internal */
        this.shownGoTopButton$ = new BehaviorSubject(false);
        /** @internal */
        this.subHeader = [];
        /** @internal */
        this.tableTestIdModifiers = TableTestIdModifiers;
        /** @internal */
        this.testIdsService = this.injector.get(TestIdsService);
        this._expandedRows = {};
        this.currentExpandedMap = {};
        this.onDestroy$ = new Subject();
        this._options = {};
        this._rows = [];
        this._columns = [];
        this.tableService.clearSelectedRows();
    }
    ngOnInit() {
        this.searchFormControl = new FormControl(this.options?.searchOptions?.initalValue || '');
        if (!!this.options.rowsExpandableOptions) {
            try {
                this.tableService.setExpandLevelByExpandOptions(this.options.rowsExpandableOptions);
            }
            catch (e) {
                this.tableMainError = true;
                throw new Error(e);
            }
        }
        const uniqueId = this.uniqueService.getUniqueId();
        this.id = this.id || `isTable${uniqueId}`;
        this.options.tableId = this.id;
        this.noDataMessage = isNullOrUndefined(this.options.noDataMessage) ? 'No Data to Display' : this.options.noDataMessage;
        this.noDataSubMessage = this.options.noDataSubMessage || '';
        this.hideHeaderOnEmpty = !isNullOrUndefined(this.options.hideHeaderOnEmpty) ? this.options.hideHeaderOnEmpty : false;
        this.isAllRowsSelectable = typeof this.options.isAllRowsSelectable === 'undefined' ? true : this.options.isAllRowsSelectable;
        this.scrollListeners();
        this.configIconNames = CONFIG_TABLE_BY_UI_STYLE[`style_v2`];
        this.wrapperClasses = this.getWrapperClasses();
        this.ignoredParentSelectorsRowClickEvent = ROW_CLICK_SUPPRESS_FOR_PARENT_SELECTORS.concat(this.options.rowsOptions?.ignoredParentSelectorsRowClickEvent ?? []);
        if (this.sortTableOnDataChanges && this.columns.find(col => !!col.sort)) {
            this.doLocalSorting();
        }
        this.searchFormControl.valueChanges.pipe(takeUntil(this.onDestroy$), debounceTime(500)).subscribe(value => {
            this.options?.searchOptions.onSearch.emit(value);
        });
    }
    ngOnDestroy() {
        this.onDestroy$.next();
        this.onDestroy$.complete();
    }
    /** @internal */
    onHeaderClicked(col) {
        if (!this.tableService.isColumnSortable(col)) {
            return;
        }
        const sortKey = col.key;
        if (!(this.options && this.options.sortingType && this.options.sortingType === 'external')) {
            this.localSorting(sortKey);
        }
        this.sortChanged.emit(sortKey);
    }
    /** @internal */
    filterColumn(column, filterIn) {
        if (column.filter.changed && column.filter.options) {
            const isAllFiltered = column.filter.options.length === filterIn.length || filterIn.length === 0;
            column.filter.changed.emit(isAllFiltered ? [] : filterIn);
        }
    }
    /** @internal */
    replaceSelectedRows({ selectedTableRows, iditicationFunc }) {
        this.tableService.replaceSelectedRows({ selectedTableRows, iditicationFunc });
    }
    /** @internal */
    doExpandRow({ rowIndex, row, isExpanded, successCallback, failedCallback, updateMap }) {
        if (!!this.expandRow.observers.length) {
            // has expandRow event subscription in host
            if (Array.isArray(this.rows)) {
                this.expandRow.emit({ rowIndex, row, isExpanded, successCallback, failedCallback, updateMap });
                this.currentExpandedMap = { ...this.currentExpandedMap, [rowIndex]: isExpanded };
            }
        }
        else {
            successCallback();
            this.updateExpandedRowsMap(rowIndex, isExpanded);
        }
    }
    /** @internal */
    trackByFunc(index, column) {
        return column && column.key ? column.key : index;
    }
    /** @internal */
    getTableClientWidth() {
        if (this.tableWrapperElement) {
            return this.tableWrapperElement.nativeElement.clientWidth;
        }
    }
    /** @internal */
    onTableBodyClicked($event) {
        if (!this.isElementChildOfSuppressed($event.target)) {
            const rowEl = $event.target.closest('tr');
            if (!isNullOrUndefined(rowEl)) {
                const rowIndex = rowEl.dataset.rowIdx;
                const rowData = this.rows[rowIndex];
                this.rowClicked.emit({ $event, rowIndex, rowEl, rowData });
            }
        }
    }
    /** @internal */
    onClickReturnTop() {
        const viewPortElement = this.scrollElement || document.documentElement;
        const currentScroll = viewPortElement.scrollTop || document.body.scrollTop;
        if (currentScroll > 0) {
            (function smoothScroll() {
                let currentScroll = viewPortElement.scrollTop || document.body.scrollTop;
                if (currentScroll > 0) {
                    window.requestAnimationFrame(smoothScroll);
                    viewPortElement.scrollTo(0, currentScroll - currentScroll / 8);
                }
            })();
        }
    }
    initRows() {
        if (!this.options?.isGroupedTable && this.rows?.length) {
            this.tableService.initSelectedRows(this.rows);
        }
        this.doLocalSorting();
        // check for rowspan columns
        this.tableService.setRowspanColumnsData(this.rows, this._columns.map(col => col.key));
    }
    getSubHeaders(columns) {
        if (columns.some(item => !!item.groupName)) {
            return columns.reduce((groups, column, idx, columns) => {
                if (column.groupName) {
                    groups.push({ name: column.groupName ?? '&nbsp;', colspan: 1 });
                }
                else {
                    if (groups[groups.length - 1] && groups[groups.length - 1].name) {
                        groups[groups.length - 1].colspan++;
                    }
                    else {
                        groups.push({ name: ' ', colspan: 1 });
                    }
                }
                return groups;
            }, []);
        }
        else {
            return [];
        }
    }
    doLocalSorting() {
        if (Array.isArray(this.rows) && this.columns && this.sortTableOnDataChanges) {
            const sortedColumn = this.columns.find(col => !!col.sort);
            if (sortedColumn) {
                sortedColumn.sort = sortedColumn.sort === 'asc' ? 'desc' : 'asc';
                this.localSorting(sortedColumn.key);
            }
        }
    }
    isElementChildOfSuppressed(element) {
        return this.ignoredParentSelectorsRowClickEvent.some((selector) => {
            return element.closest(selector);
        });
    }
    updateExpandedRowsMap(rowIndex, isExpanded) {
        this._expandedRows = { ...this._expandedRows, [rowIndex]: isExpanded };
        this.expandedRowsChange.emit(this._expandedRows);
    }
    onExternalExpandRowChanged(newValue) {
        const diffMap = this.getRowsToExpandToggle(this.currentExpandedMap, newValue);
        this.currentExpandedMap = newValue;
        if (diffMap.includes('default')) {
            const rowsInTable = this.rows.length;
            [...Array(rowsInTable).keys()].forEach(rowIndex => {
                this.callOnExpandRow({
                    rowIndex: rowIndex,
                    row: this.rows[rowIndex],
                    isExpanded: newValue['default']
                });
            });
        }
        else {
            diffMap.forEach(rowIndex => {
                this.callOnExpandRow({
                    rowIndex: parseInt(rowIndex, 10),
                    row: this.rows[rowIndex],
                    isExpanded: newValue[rowIndex]
                });
            });
        }
    }
    callOnExpandRow({ rowIndex, row, isExpanded }) {
        this.tableBodyComponent.onExpandRow({ rowIndex, row, isExpanded }, false);
    }
    getRowsToExpandToggle(curValue, newValue) {
        return Object.keys(newValue)
            .map(key => {
            if (newValue[key] !== curValue[key]) {
                return key;
            }
            return null;
        })
            .filter(Boolean);
    }
    getWrapperClasses() {
        const classes = [];
        if (!!this.options && !!this.options.rowHeight) {
            classes.push(`is-row-height-${this.options.rowHeight}`);
        }
        if (this.options?.stickyHeader && this.options?.scrollElementSelector) {
            classes.push(`fu-stocky-to-external`);
        }
        return classes;
    }
    scrollListeners() {
        defer(() => fromEvent(this.scrollElement, 'scroll').pipe(takeUntil(this.onDestroy$), tap(_ => {
            const scrollLeft = this.scrollElement.scrollLeft;
            if (this.lastScrollLeftValue !== scrollLeft) {
                this.isScrollRight = scrollLeft > 0;
                this.lastScrollLeftValue = scrollLeft;
                this.cdr.markForCheck();
            }
        }), debounceTime(10))).subscribe(this.onScroll.bind(this));
    }
    localSorting(sortKey) {
        let isAscSort;
        const tableRows = [...this.rows];
        // reset header sort options
        this.columns.forEach(col => {
            if (col.key !== sortKey) {
                if (!isUndefined(col.sort)) {
                    col.sort = '';
                }
            }
            else {
                col.sort = col.sort === '' ? 'asc' : col.sort === 'asc' ? 'desc' : 'asc';
                isAscSort = col.sort === 'asc';
            }
        });
        let totalRow = [];
        let otherRows = [];
        if (!isNullOrUndefined(this.options.hasTotalsRow) && this.options.hasTotalsRow) {
            totalRow = tableRows.slice(0, 1);
            otherRows = tableRows.slice(1);
        }
        else {
            otherRows = tableRows;
        }
        otherRows.sort((a, b) => {
            if (isNullOrUndefined(a[sortKey]) || isNullOrUndefined(b[sortKey])) {
                return 0;
            }
            // if data type - numeric
            if (!Array.isArray(a[sortKey]) && !isNaN(a[sortKey]) && !isNaN(b[sortKey]) && a[sortKey] - parseFloat(a[sortKey]) + 1 >= 0) {
                return isAscSort ? a[sortKey] - b[sortKey] : (a[sortKey] - b[sortKey]) * -1;
            }
            // if it string;
            const strA = a[sortKey].toString().toUpperCase();
            const strB = b[sortKey].toString().toUpperCase();
            if (strA < strB) {
                return isAscSort ? -1 : 1;
            }
            if (strA > strB) {
                return isAscSort ? 1 : -1;
            }
            return 0;
        });
        this._rows = [...totalRow, ...otherRows].filter(Boolean);
    }
    onScroll($event) {
        if (this.options.hasReturnToTopButton) {
            this.shownGoTopButton$.next(this.scrollElement.scrollTop > this.tableElement.nativeElement.offsetTop);
        }
        const target = $event.target || $event;
        if (!this.options.pagination || this.options.pagination.loading || !this.options.pagination.enable) {
            return;
        }
        const top = this.scrollElement.scrollTop;
        if (top >= this.tableElement.nativeElement.offsetHeight - this.scrollElement.offsetHeight - 100) {
            if (!this.options.pagination.handleLoadingFromHost) {
                this.options.pagination.loading = true;
            }
            this.scrollDown.emit(target);
        }
    }
    static { this.ɵfac = function TableComponent_Factory(t) { return new (t || TableComponent)(i0.ɵɵdirectiveInject(i1.TableService), i0.ɵɵdirectiveInject(i2.UniqueIdService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.Injector)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TableComponent, selectors: [["fusion-table"]], viewQuery: function TableComponent_Query(rf, ctx) { if (rf & 1) {
            i0.ɵɵviewQuery(_c0, 5);
            i0.ɵɵviewQuery(_c1, 5);
            i0.ɵɵviewQuery(_c2, 5);
            i0.ɵɵviewQuery(_c3, 5);
            i0.ɵɵviewQuery(_c4, 7);
            i0.ɵɵviewQuery(_c5, 5);
        } if (rf & 2) {
            let _t;
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.stringCell = _t.first);
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.checkboxCell = _t.first);
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateCell = _t.first);
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tableElement = _t.first);
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tableWrapperElement = _t.first);
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tableBodyComponent = _t.first);
        } }, hostVars: 14, hostBindings: function TableComponent_HostBindings(rf, ctx) { if (rf & 2) {
            i0.ɵɵclassProp("fixed-table", ctx.isFixedHeader)("fu-no-table-frame", ctx.noTableFrame)("fu-no-table-footer", ctx.noTableFooter)("is-empty", ctx.isEmpty)("is-loading", ctx.isLoading)("on-scroll-right", ctx.isScrollRight)("on-vertical-scroll", ctx.onVerticalScroll);
        } }, inputs: { id: "id", options: "options", columns: "columns", rows: "rows", loading: "loading", sortTableOnDataChanges: "sortTableOnDataChanges", expandedRows: "expandedRows", testId: "testId" }, outputs: { sortChanged: "sortChanged", selectionChanged: "selectionChanged", rowModelChange: "rowModelChange", rowClicked: "rowClicked", scrollDown: "scrollDown", rowActionClicked: "rowActionClicked", expandRow: "expandRow", expandedRowsChange: "expandedRowsChange" }, features: [i0.ɵɵProvidersFeature([TableService])], decls: 10, vars: 8, consts: [["class", "fu-table-header", 4, "ngIf"], [1, "tableWrap", 3, "ngClass"], ["tableWrapper", ""], [3, "id", 4, "ngIf"], [4, "ngIf"], [3, "id"], ["class", "fu-table-footer", 4, "ngIf"], ["headerExpandColumn", ""], [1, "fu-table-header"], ["class", "fu-search-holder", 4, "ngIf"], [1, "fu-table-label"], [1, "fu-info-icon", 3, "fusionTooltip", "name"], [1, "fu-search-holder"], [2, "width", "300px", 3, "formControl", "placeholder", "testId"], ["table", ""], [3, "fusionTableEmpty", "customContent", "header", "subHeader", "icon", "imageBackgroundUrl", 4, "ngIf"], [3, "fusionTableLoading", 4, "ngIf"], [3, "hidden", 4, "ngIf"], ["fusionTableBasic", "", 3, "rows", "columns", "options", "tableClientWidth", "expandedRows", "testId", "rowSelected", "expandRow", "click", 4, "ngIf"], ["fusionTableGrouped", "", 3, "rows", "columns", "options", "rowSelected", 4, "ngIf"], [3, "hidden"], [3, "ngStyle"], [3, "ngClass", "ngStyle", "width", "text-align", "top", "click", 4, "ngFor", "ngForOf", "ngForTrackBy"], ["class", "fu-header-group", 3, "fu-border-left", 4, "ngFor", "ngForOf"], [1, "fu-header-group"], [3, "ngClass", "ngStyle", "click"], [1, "fu-header-text", 3, "fusionTooltip"], [1, "fu-sort-wrapper"], [1, "fu-sort-up"], [1, "fu-sort-down"], ["placeholder", "Please Select", "class", "filter", "selectAllLabel", "Select All <span class='grey'>(No Filters)</span>", 3, "selected", "options", "confirm", "search", "selectedChange", 4, "ngIf"], ["class", "is-regular", "title", "select / un-select all", 3, "checked", "isIndeterminate", "name", "changed", 4, "ngIf"], ["placeholder", "Please Select", "selectAllLabel", "Select All <span class='grey'>(No Filters)</span>", 1, "filter", 3, "selected", "options", "confirm", "search", "selectedChange"], ["title", "select / un-select all", 1, "is-regular", 3, "checked", "isIndeterminate", "name", "changed"], [3, "fusionTableLoading"], ["fusionTableBasic", "", 3, "rows", "columns", "options", "tableClientWidth", "expandedRows", "testId", "rowSelected", "expandRow", "click"], ["tableBody", ""], ["fusionTableGrouped", "", 3, "rows", "columns", "options", "rowSelected"], [3, "fusionTableEmpty", "customContent", "header", "subHeader", "icon", "imageBackgroundUrl"], ["fusionTooltip", "Return to top", 1, "fu-button-return-top", 3, "click"], [1, "fu-return-top-icon", 3, "name"], [1, "fu-table-footer"], [1, "expand-column"]], template: function TableComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, TableComponent_div_0_Template, 3, 2, "div", 0);
            i0.ɵɵelementStart(1, "div", 1, 2);
            i0.ɵɵtemplate(3, TableComponent_table_3_Template, 5, 4, "table", 3)(4, TableComponent_ng_container_4_Template, 4, 7, "ng-container", 4);
            i0.ɵɵpipe(5, "async");
            i0.ɵɵelementEnd();
            i0.ɵɵelement(6, "div", 5);
            i0.ɵɵtemplate(7, TableComponent_div_7_Template, 1, 0, "div", 6)(8, TableComponent_ng_template_8_Template, 2, 6, "ng-template", null, 7, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            i0.ɵɵproperty("ngIf", !ctx.noTableFrame);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngClass", ctx.wrapperClasses);
            i0.ɵɵadvance(2);
            i0.ɵɵproperty("ngIf", !ctx.tableMainError);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", (ctx.options == null ? null : ctx.options.hasReturnToTopButton) && i0.ɵɵpipeBind1(5, 6, ctx.shownGoTopButton$));
            i0.ɵɵadvance(2);
            i0.ɵɵpropertyInterpolate1("id", "", ctx.id, "_tableTeleportWrapper");
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", !ctx.noTableFooter);
        } }, dependencies: [i3.NgClass, i3.NgForOf, i3.NgIf, i3.NgStyle, i4.IconComponent, i5.CheckboxComponent, i6.MultiDropdownComponent, i7.TooltipDirective, i8.NgControlStatus, i8.FormControlDirective, i9.SearchComponent, i10.TableBasicComponent, i11.TableEmptyComponent, i12.TableGroupedComponent, i13.TableLoadingComponent, i3.AsyncPipe, i14.GenericPipe], styles: ["@font-face{font-family:NHaasGroteskDSPro;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.ttf) format(\"truetype\")}@font-face{font-family:NHaasGroteskDSPro-65Md;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue-Medium;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.ttf) format(\"truetype\")}.font-heading-6[_ngcontent-%COMP%], .font-heading-5[_ngcontent-%COMP%], .font-heading-4[_ngcontent-%COMP%], .font-heading-3[_ngcontent-%COMP%], .font-heading-2[_ngcontent-%COMP%], .font-heading-1[_ngcontent-%COMP%]{font-family:NHaasGroteskDSPro,sans-serif}.font-heading-1[_ngcontent-%COMP%]{font-size:60px}.font-heading-2[_ngcontent-%COMP%]{font-size:32px}.font-heading-3[_ngcontent-%COMP%]{font-size:22px}.font-heading-4[_ngcontent-%COMP%]{font-size:18px}.font-heading-5[_ngcontent-%COMP%]{font-size:15px}.font-heading-6[_ngcontent-%COMP%]{font-size:13px}.font-heading-label[_ngcontent-%COMP%]{font-size:11px;font-family:NHaasGroteskDSPro-65Md,sans-serif;letter-spacing:.25px}.font-caption[_ngcontent-%COMP%], [_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.fu-header-group[_ngcontent-%COMP%], .font-bodyXSmall[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-search-holder[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder, .font-bodySmall[_ngcontent-%COMP%], .font-bodyMedium[_ngcontent-%COMP%], .font-bodyLarge[_ngcontent-%COMP%]{font-family:HelveticaNeue,helvetica,sans-serif;line-height:1.5}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], .font-bodyXSmallStrong[_ngcontent-%COMP%], .font-bodySmallStrong[_ngcontent-%COMP%], [_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-table-label[_ngcontent-%COMP%], .font-bodyMediumStrong[_ngcontent-%COMP%], .font-bodyLargeStrong[_ngcontent-%COMP%]{font-family:HelveticaNeue-Medium,helvetica,sans-serif;line-height:1.5}.font-bodyLarge[_ngcontent-%COMP%], .font-bodyLargeStrong[_ngcontent-%COMP%]{font-size:16px}.font-bodyMedium[_ngcontent-%COMP%]{font-size:14px}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-table-label[_ngcontent-%COMP%], .font-bodyMediumStrong[_ngcontent-%COMP%]{font-size:14px}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-search-holder[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder, .font-bodySmall[_ngcontent-%COMP%]{font-size:13px;letter-spacing:.24px}.font-bodySmallStrong[_ngcontent-%COMP%]{font-size:13px;letter-spacing:.24px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.fu-header-group[_ngcontent-%COMP%], .font-bodyXSmall[_ngcontent-%COMP%]{font-size:12px;letter-spacing:.24px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], .font-bodyXSmallStrong[_ngcontent-%COMP%]{font-size:12px;letter-spacing:.24px}.font-caption[_ngcontent-%COMP%]{font-size:11px}[_nghost-%COMP%]   *[_ngcontent-%COMP%]{box-sizing:border-box}[_nghost-%COMP%]{margin:0;padding:0;vertical-align:initial;text-align:initial}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]::-webkit-scrollbar{background-color:#fff;width:12px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]::-webkit-scrollbar-track{background-color:#fff}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:#53575b4d;border-radius:13px;border:4px solid #fff}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]::-webkit-scrollbar-button{display:none}@keyframes _ngcontent-%COMP%_rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_shineAnimation{0%{background-position:-750px 0}to{background-position:750px 0}}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort[_ngcontent-%COMP%]   .fu-sort-wrapper[_ngcontent-%COMP%]   .fu-sort-down[_ngcontent-%COMP%], [_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort[_ngcontent-%COMP%]   .fu-sort-wrapper[_ngcontent-%COMP%]   .fu-sort-up[_ngcontent-%COMP%]{width:0;height:0;border:4px solid transparent}[_nghost-%COMP%]{display:block;width:100%;height:100%;border:1px solid var(--fu-light-400, #DDDFE1);border-radius:16px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]{height:calc(100% - 128px);display:block;overflow:auto}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]::-webkit-scrollbar-track{margin-top:40px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]{border:none;margin:0;width:calc(100% - 2px);border-collapse:collapse;border-spacing:0}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{color:var(--fu-light-1000, #626970);white-space:nowrap;position:relative;padding:0 16px;max-width:350px;height:40px;line-height:1;cursor:default;box-sizing:border-box}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort[_ngcontent-%COMP%]{cursor:pointer}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort[_ngcontent-%COMP%]   .fu-header-text[_ngcontent-%COMP%]{display:inline-flex;line-height:20px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort[_ngcontent-%COMP%]   .fu-sort-wrapper[_ngcontent-%COMP%]{display:none;vertical-align:middle;flex-direction:column;gap:4px;margin-left:4px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort.desc[_ngcontent-%COMP%]   .fu-header-text[_ngcontent-%COMP%], [_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort.asc[_ngcontent-%COMP%]   .fu-header-text[_ngcontent-%COMP%]{padding-top:1px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort.desc[_ngcontent-%COMP%]   .fu-sort-wrapper[_ngcontent-%COMP%]{display:inline-flex}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort.desc[_ngcontent-%COMP%]   .fu-sort-wrapper[_ngcontent-%COMP%]   .fu-sort-up[_ngcontent-%COMP%]{border-bottom-color:var(--fu-light-600, #B7BBC0)}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort.desc[_ngcontent-%COMP%]   .fu-sort-wrapper[_ngcontent-%COMP%]   .fu-sort-down[_ngcontent-%COMP%]{border-top-color:var(--fu-black-500, #53575B)}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort.asc[_ngcontent-%COMP%]   .fu-sort-wrapper[_ngcontent-%COMP%]{display:inline-flex}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort.asc[_ngcontent-%COMP%]   .fu-sort-wrapper[_ngcontent-%COMP%]   .fu-sort-up[_ngcontent-%COMP%]{border-bottom-color:var(--fu-black-500, #53575B)}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort.asc[_ngcontent-%COMP%]   .fu-sort-wrapper[_ngcontent-%COMP%]   .fu-sort-down[_ngcontent-%COMP%]{border-top-color:var(--fu-light-600, #B7BBC0)}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-checkbox-holder[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.sticky-left[_ngcontent-%COMP%]{background-color:var(--fu-white, #ffffff);position:sticky;left:0;z-index:3}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(.fu-header-group):after{border-bottom:2px solid var(--table-header-bottom-border-color, var(--fu-light-400, #DDDFE1));content:\"\";position:absolute;left:0;bottom:-1px;width:100%}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.fu-header-group[_ngcontent-%COMP%]{height:32px;vertical-align:bottom}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.fu-header-group[_ngcontent-%COMP%]:first-of-type{border-left:none}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.fu-border-left[_ngcontent-%COMP%]{border-left:solid 1px var(--fu-light-400, #DDDFE1)}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.fu-border-left[_ngcontent-%COMP%]:first-of-type{border-left:none}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]   .fu-tooltiped[_ngcontent-%COMP%]{cursor:help}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]{overflow:auto}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{white-space:nowrap}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   .fu-button-return-top[_ngcontent-%COMP%]{width:48px;height:48px;background-color:var(--fu-white, #ffffff);border-radius:24px;box-shadow:0 1px 4px #0000003d;display:flex;justify-content:center;align-items:center;cursor:pointer;position:absolute;right:42px;bottom:96px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   .fu-button-return-top[_ngcontent-%COMP%]   fusion-icon.fu-return-top-icon[_ngcontent-%COMP%]{width:32px;height:32px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   .fu-button-return-top[_ngcontent-%COMP%]   fusion-icon.fu-return-top-icon[_ngcontent-%COMP%]     svg{width:32px;height:32px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   .fu-button-return-top[_ngcontent-%COMP%]   fusion-icon.fu-return-top-icon[_ngcontent-%COMP%]     svg *{fill:var(--fu-light-800, #8E959D)}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   .fu-button-return-top[_ngcontent-%COMP%]:hover   fusion-icon.fu-return-top-icon[_ngcontent-%COMP%]     svg{width:32px;height:32px}[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   .fu-button-return-top[_ngcontent-%COMP%]:hover   fusion-icon.fu-return-top-icon[_ngcontent-%COMP%]     svg *{fill:var(--fu-black-500, #53575B)}[_nghost-%COMP%]   .tableWrap.is-empty[_ngcontent-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort[_ngcontent-%COMP%], [_nghost-%COMP%]   .tableWrap.is-loading[_ngcontent-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.is-sort[_ngcontent-%COMP%]{cursor:default;pointer-events:none}[_nghost-%COMP%]   .tableWrap.is-empty[_ngcontent-%COMP%]   .is-overlay-loader-holder[_ngcontent-%COMP%], [_nghost-%COMP%]   .tableWrap.is-loading[_ngcontent-%COMP%]   .is-overlay-loader-holder[_ngcontent-%COMP%]{position:absolute;z-index:2;width:100%;height:100%;min-height:100px;top:42px;background-color:#ffffffe6}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]{height:56px;width:100%;display:flex;align-items:center;border-bottom:1px solid var(--fu-light-400, #DDDFE1)}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-table-label[_ngcontent-%COMP%]{color:var(--fu-black-500, #53575B);padding:19px;display:flex;align-items:center;gap:4px;line-height:16px}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-table-label[_ngcontent-%COMP%]   fusion-icon.fu-info-icon[_ngcontent-%COMP%]{width:16px;height:16px}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-table-label[_ngcontent-%COMP%]   fusion-icon.fu-info-icon[_ngcontent-%COMP%]     svg{width:16px;height:16px}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-table-label[_ngcontent-%COMP%]   fusion-icon.fu-info-icon[_ngcontent-%COMP%]     svg *{fill:var(--fu-light-500, #D2D5D8)}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-search-holder[_ngcontent-%COMP%]{flex-grow:2;height:100%;border-left:solid 1px var(--fu-light-400, #DDDFE1);padding-left:8px;display:flex;align-items:center}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-search-holder[_ngcontent-%COMP%]   fusion-icon.fu-search-icon[_ngcontent-%COMP%]{width:16px;height:16px}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-search-holder[_ngcontent-%COMP%]   fusion-icon.fu-search-icon[_ngcontent-%COMP%]     svg{width:16px;height:16px}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-search-holder[_ngcontent-%COMP%]   fusion-icon.fu-search-icon[_ngcontent-%COMP%]     svg *{fill:var(--fu-light-700, #A9AFB4)}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-search-holder[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{width:calc(100% - 30px);border:none;box-sizing:border-box;padding:10px;color:var(--fu-black-500, #53575B)}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-search-holder[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]::placeholder{color:var(--fu-light-800, #8E959D)}[_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-search-holder[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:active, [_nghost-%COMP%]   .fu-table-header[_ngcontent-%COMP%]   .fu-search-holder[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]:focus{outline:none}[_nghost-%COMP%]   .fu-table-footer[_ngcontent-%COMP%]{height:72px;width:100%;display:flex;align-items:center}.fu-no-table-frame[_nghost-%COMP%]{border:initial;border-radius:initial}.fu-no-table-frame[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]{height:100%}.fu-no-table-frame[_nghost-%COMP%]   .fu-button-return-top[_ngcontent-%COMP%]{bottom:24px}.fixed-table[_nghost-%COMP%]{position:relative}.fixed-table[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]{height:calc(100% - 128px)}.fixed-table[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]{border-bottom:none}.fixed-table[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{height:40px;position:sticky;top:0;z-index:3;background-color:var(--fu-white, #ffffff)}.fixed-table[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]   table[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%]   td.sticky-left[_ngcontent-%COMP%]{left:0;z-index:4}.fixed-table[_nghost-%COMP%]   .tableWrap.fu-stocky-to-external[_ngcontent-%COMP%]{display:initial}.fixed-table[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%] + .fu-table-footer[_ngcontent-%COMP%]{border-top:solid 1px var(--fu-light-400, #DDDFE1)}.fixed-table[_nghost-%COMP%]:after{content:\"\";position:absolute;right:0;top:57px;background-color:transparent;width:16px;height:40px;border-bottom:2px solid var(--table-header-bottom-border-color, var(--fu-light-400, #DDDFE1));box-sizing:border-box}.fixed-table.fu-no-table-frame[_nghost-%COMP%]   .tableWrap[_ngcontent-%COMP%]{height:100%}.fixed-table.fu-no-table-frame[_nghost-%COMP%]:after{top:1px}.fu-no-table-footer[_nghost-%COMP%]{border-bottom-left-radius:0;border-bottom-right-radius:0}.is-empty[_nghost-%COMP%]   .fu-table-footer[_ngcontent-%COMP%]{border-top:1px solid var(--fu-light-400, #DDDFE1)}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableComponent, [{
        type: Component,
        args: [{ selector: 'fusion-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [TableService], template: "<div *ngIf=\"!noTableFrame\" class=\"fu-table-header\">\n    <ng-container *ngIf=\"options?.tableLabel as tableLabel\">\n        <div class=\"fu-table-label\" [attr.data-testid]=\"testIdsService.getTestAttribute.bind(this) | generic:testId:tableTestIdModifiers.LABEL\">{{tableLabel.text}}\n        <ng-container *ngIf=\"tableLabel.tooltip\">\n            <fusion-icon [fusionTooltip]=\"tableLabel.tooltip\" class=\"fu-info-icon\" [name]=\"tableLabel.icon ?? {iconName: 'info', iconVersion: 'v3'}\"></fusion-icon>\n        </ng-container>\n        </div>\n    </ng-container>\n    <div class=\"fu-search-holder\" *ngIf=\"options?.searchOptions as searchOptions\">\n        <fusion-search style=\"width: 300px;\"\n            [formControl]=\"searchFormControl\"\n            [placeholder]=\"searchOptions.placeholder\"\n            [testId]=\"testId\"\n        ></fusion-search>\n    </div>\n</div>\n<div class=\"tableWrap\" [ngClass]=\"wrapperClasses\" #tableWrapper>\n    <table [id]=\"id\" #table *ngIf=\"!tableMainError\">\n        <ng-container *ngIf=\"columns && options\">\n            <thead *ngIf=\"columns.length\" [hidden]=\"(isEmpty || (loading && !isLoadingOverlay)) && hideHeaderOnEmpty\">\n                <!--SubHeader-->\n                <tr *ngIf=\"subHeader.length\">\n                    <!--<ng-container *ngIf=\"!!options?.rowsExpandableOptions\" [ngTemplateOutlet]=\"headerExpandColumn\" [ngTemplateOutletContext]=\"{$implicit: true}\"></ng-container>-->\n                    <td *ngFor=\"let subheader of subHeader let isFirst = first\"\n                        class=\"fu-header-group\"\n                        [class.fu-border-left]=\"!isFirst\"\n                        [attr.colspan]=\"(isFirst && !!options?.rowsExpandableOptions) ? subheader.colspan + 1 : subheader.colspan\"\n                    >\n                        {{ subheader.name}}\n                    </td>\n                </tr>\n                <!--SubHeader-->\n                <!--Header-->\n                <tr [ngStyle]=\"!!options.rowsOptions && !!options.rowsOptions.headerRow ? options.rowsOptions.headerRow.style : null\">\n                    <!--<ng-container *ngIf=\"!!options?.rowsExpandableOptions\" [ngTemplateOutlet]=\"headerExpandColumn\"></ng-container>-->\n                    <td\n                        *ngFor=\"let column of columns; trackBy: trackByFunc; let isLast = last; let isFirst = first; let idx = index\"\n                        [attr.data-col-key]=\"column.key\"\n                        [ngClass]=\"tableService.getColumnClasses(column, true)\"\n                        [ngStyle]=\"tableService.getColumnStyle(column)\"\n                        (click)=\"onHeaderClicked(column)\"\n                        [style.width]=\"tableService.setWidth(isLast, column.width)\"\n                        [style.text-align]=\"column.headerAlign\"\n                        [attr.colspan]=\"isFirst ? (tableService.expandLevels + 1) : undefined\"\n                        [style.top.px]=\"options?.stickyHeaderTopOffset\"\n                        [attr.data-testid]=\"testIdsService.getTestAttribute.bind(this) | generic:testId:(tableTestIdModifiers.COLUMN_HEADER+idx)\"\n                    >\n                        <ng-container>\n                            <div class=\"fu-header-text\"\n                                 [class.fu-tooltiped]=\"column.tooltip\" [fusionTooltip]=\"column.tooltip\"\n                                 [attr.data-testid]=\"testIdsService.getTestAttribute.bind(this) | generic:testId:(tableTestIdModifiers.COLUMN_TITLE+idx)\"\n                            >{{ column.title }}</div>\n                            <div class=\"fu-sort-wrapper\">\n                                <div class=\"fu-sort-up\" [attr.data-testid]=\"testIdsService.getTestAttribute.bind(this) | generic:testId:(tableTestIdModifiers.COLUMN_SORT_UP+idx)\"></div>\n                                <div class=\"fu-sort-down\" [attr.data-testid]=\"testIdsService.getTestAttribute.bind(this) | generic:testId:(tableTestIdModifiers.COLUMN_SORT_DOWN+idx)\"></div>\n                            </div>\n                        </ng-container>\n                        <fusion-multi-dropdown\n                            *ngIf=\"column.filter && column.filter.options\"\n                            placeholder=\"Please Select\"\n                            class=\"filter\"\n                            [selected]=\"column.filter.selected\"\n                            [options]=\"column.filter.options\"\n                            (selectedChange)=\"filterColumn(column, $event)\"\n                            [confirm]=\"true\"\n                            [search]=\"true\"\n                            selectAllLabel=\"Select All <span class='grey'>(No Filters)</span>\"\n                        >\n                        </fusion-multi-dropdown>\n                        <fusion-checkbox\n                            class=\"is-regular\"\n                            title=\"select / un-select all\"\n                            *ngIf=\"tableService.isTypeCheckbox(column) && isAllRowsSelectable && !isEmpty && isCheckboxTitleShown\"\n                            [checked]=\"tableService.isAllRowsSelected(rows)\"\n                            [isIndeterminate]=\"tableService.isPartialSelected(rows)\"\n                            (changed)=\"tableService.onRowsSelectChanged(options.isGroupedTable, rows, $event)\"\n                            [name]=\"'rows_all'\"\n                            [attr.data-testid]=\"testIdsService.getTestAttribute.bind(this) | generic:testId:tableTestIdModifiers.COLUMN_HEADER_SELECT_ALL\"\n                        >\n                        </fusion-checkbox>\n                    </td>\n                </tr>\n                <!--Header-->\n            </thead>\n\n            <tbody *ngIf=\"loading && !isLoadingOverlay\" [fusionTableLoading]=\"colsCount\"></tbody>\n            <!--Table Body-->\n            <tbody\n                *ngIf=\"!options.isGroupedTable && (!loading || isLoadingOverlay) && !isEmpty\"\n                fusionTableBasic\n                [rows]=\"tableRows\"\n                [columns]=\"columns\"\n                [options]=\"options\"\n                [tableClientWidth]=\"getTableClientWidth()\"\n                [expandedRows]=\"expandedRows\"\n                [testId]=\"testId\"\n                (rowSelected)=\"selectionChanged.emit($event)\"\n                (expandRow)=\"doExpandRow($event)\"\n                (click)=\"onTableBodyClicked($event)\"\n                #tableBody\n            ></tbody>\n            <!--Table Body-->\n            <!--table pagination loading overlay-->\n            <ng-container *ngIf=\"options?.pagination && options.pagination.loading\">\n                <tbody [fusionTableLoading]=\"colsCount\"></tbody>\n            </ng-container>\n            <!--Grouped Table Body-->\n            <tbody\n                *ngIf=\"options.isGroupedTable && (!loading || isLoadingOverlay) && !isEmpty\"\n                fusionTableGrouped\n                [rows]=\"groupedTableRows\"\n                [columns]=\"columns\"\n                [options]=\"options\"\n                (rowSelected)=\"selectionChanged.emit($event)\"\n            ></tbody>\n            <!--Grouped Table Body-->\n        </ng-container>\n        <!--table empty-->\n        <tbody\n            *ngIf=\"!loading && isEmpty\"\n            [fusionTableEmpty]=\"colsCount\"\n            [customContent]=\"options?.customNoData\"\n            [header]=\"noDataMessage\"\n            [subHeader]=\"noDataSubMessage\"\n            [icon]=\"options?.emptyTableIcon\"\n            [imageBackgroundUrl]=\"options?.noDataImageBgUrl\"\n        ></tbody>\n        <!--table empty-->\n        <!--table empty loading-->\n        <tbody\n            *ngIf=\"isEmpty && loading\"\n            [fusionTableLoading]=\"colsCount\"\n        ></tbody>\n        <!--table empty loading-->\n    </table>\n    <!--table pagination loading overlay-->\n    <ng-container *ngIf=\"options?.hasReturnToTopButton && (shownGoTopButton$ | async)\">\n        <div class=\"fu-button-return-top\" fusionTooltip=\"Return to top\" (click)=\"onClickReturnTop()\" [attr.data-testid]=\"testIdsService.getTestAttribute.bind(this) | generic:testId:tableTestIdModifiers.BUTTON_GO_TOP\">\n            <fusion-icon class=\"fu-return-top-icon\" [name]=\"{iconName:'angle-up', iconVersion: 'v3'}\"></fusion-icon>\n        </div>\n    </ng-container>\n</div>\n<div id=\"{{id}}_tableTeleportWrapper\"></div>\n<div *ngIf=\"!noTableFooter\" class=\"fu-table-footer\"></div>\n\n<ng-template #headerExpandColumn let-isSubHeader>\n    <td\n        class=\"expand-column\"\n        [class.fu-header-group]=\"isSubHeader\"\n        [class.sticky-left]=\"options?.rowsExpandableOptions?.sticky\"\n        [style.top.px]=\"options?.stickyHeaderTopOffset\"\n    >\n        <span></span>\n    </td>\n</ng-template>\n", styles: ["@font-face{font-family:NHaasGroteskDSPro;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-75Bd.ttf) format(\"truetype\")}@font-face{font-family:NHaasGroteskDSPro-65Md;src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot);src:url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/NHaasGroteskDSPro-65Md.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue.ttf) format(\"truetype\")}@font-face{font-family:HelveticaNeue-Medium;src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot);src:url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.eot?#iefix) format(\"embedded-opentype\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff2) format(\"woff2\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.woff) format(\"woff\"),url(https://fusion.ironsrc.net/assets/fonts/HelveticaNeue-Medium.ttf) format(\"truetype\")}.font-heading-6,.font-heading-5,.font-heading-4,.font-heading-3,.font-heading-2,.font-heading-1{font-family:NHaasGroteskDSPro,sans-serif}.font-heading-1{font-size:60px}.font-heading-2{font-size:32px}.font-heading-3{font-size:22px}.font-heading-4{font-size:18px}.font-heading-5{font-size:15px}.font-heading-6{font-size:13px}.font-heading-label{font-size:11px;font-family:NHaasGroteskDSPro-65Md,sans-serif;letter-spacing:.25px}.font-caption,:host .tableWrap table thead td.fu-header-group,.font-bodyXSmall,:host .fu-table-header .fu-search-holder input::placeholder,.font-bodySmall,.font-bodyMedium,.font-bodyLarge{font-family:HelveticaNeue,helvetica,sans-serif;line-height:1.5}:host .tableWrap table thead td,.font-bodyXSmallStrong,.font-bodySmallStrong,:host .fu-table-header .fu-table-label,.font-bodyMediumStrong,.font-bodyLargeStrong{font-family:HelveticaNeue-Medium,helvetica,sans-serif;line-height:1.5}.font-bodyLarge,.font-bodyLargeStrong{font-size:16px}.font-bodyMedium{font-size:14px}:host .fu-table-header .fu-table-label,.font-bodyMediumStrong{font-size:14px}:host .fu-table-header .fu-search-holder input::placeholder,.font-bodySmall{font-size:13px;letter-spacing:.24px}.font-bodySmallStrong{font-size:13px;letter-spacing:.24px}:host .tableWrap table thead td.fu-header-group,.font-bodyXSmall{font-size:12px;letter-spacing:.24px}:host .tableWrap table thead td,.font-bodyXSmallStrong{font-size:12px;letter-spacing:.24px}.font-caption{font-size:11px}:host *{box-sizing:border-box}:host{margin:0;padding:0;vertical-align:initial;text-align:initial}:host .tableWrap::-webkit-scrollbar{background-color:#fff;width:12px}:host .tableWrap::-webkit-scrollbar-track{background-color:#fff}:host .tableWrap::-webkit-scrollbar-thumb{background-color:#53575b4d;border-radius:13px;border:4px solid #fff}:host .tableWrap::-webkit-scrollbar-button{display:none}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes shineAnimation{0%{background-position:-750px 0}to{background-position:750px 0}}:host .tableWrap table thead td.is-sort .fu-sort-wrapper .fu-sort-down,:host .tableWrap table thead td.is-sort .fu-sort-wrapper .fu-sort-up{width:0;height:0;border:4px solid transparent}:host{display:block;width:100%;height:100%;border:1px solid var(--fu-light-400, #DDDFE1);border-radius:16px}:host .tableWrap{height:calc(100% - 128px);display:block;overflow:auto}:host .tableWrap::-webkit-scrollbar-track{margin-top:40px}:host .tableWrap table{border:none;margin:0;width:calc(100% - 2px);border-collapse:collapse;border-spacing:0}:host .tableWrap table thead td{color:var(--fu-light-1000, #626970);white-space:nowrap;position:relative;padding:0 16px;max-width:350px;height:40px;line-height:1;cursor:default;box-sizing:border-box}:host .tableWrap table thead td.is-sort{cursor:pointer}:host .tableWrap table thead td.is-sort .fu-header-text{display:inline-flex;line-height:20px}:host .tableWrap table thead td.is-sort .fu-sort-wrapper{display:none;vertical-align:middle;flex-direction:column;gap:4px;margin-left:4px}:host .tableWrap table thead td.is-sort.desc .fu-header-text,:host .tableWrap table thead td.is-sort.asc .fu-header-text{padding-top:1px}:host .tableWrap table thead td.is-sort.desc .fu-sort-wrapper{display:inline-flex}:host .tableWrap table thead td.is-sort.desc .fu-sort-wrapper .fu-sort-up{border-bottom-color:var(--fu-light-600, #B7BBC0)}:host .tableWrap table thead td.is-sort.desc .fu-sort-wrapper .fu-sort-down{border-top-color:var(--fu-black-500, #53575B)}:host .tableWrap table thead td.is-sort.asc .fu-sort-wrapper{display:inline-flex}:host .tableWrap table thead td.is-sort.asc .fu-sort-wrapper .fu-sort-up{border-bottom-color:var(--fu-black-500, #53575B)}:host .tableWrap table thead td.is-sort.asc .fu-sort-wrapper .fu-sort-down{border-top-color:var(--fu-light-600, #B7BBC0)}:host .tableWrap table thead td.is-checkbox-holder{text-align:center}:host .tableWrap table thead td.sticky-left{background-color:var(--fu-white, #ffffff);position:sticky;left:0;z-index:3}:host .tableWrap table thead td:not(.fu-header-group):after{border-bottom:2px solid var(--table-header-bottom-border-color, var(--fu-light-400, #DDDFE1));content:\"\";position:absolute;left:0;bottom:-1px;width:100%}:host .tableWrap table thead td.fu-header-group{height:32px;vertical-align:bottom}:host .tableWrap table thead td.fu-header-group:first-of-type{border-left:none}:host .tableWrap table thead td.fu-border-left{border-left:solid 1px var(--fu-light-400, #DDDFE1)}:host .tableWrap table thead td.fu-border-left:first-of-type{border-left:none}:host .tableWrap table thead td .fu-tooltiped{cursor:help}:host .tableWrap table tbody{overflow:auto}:host .tableWrap table tbody td{white-space:nowrap}:host .tableWrap .fu-button-return-top{width:48px;height:48px;background-color:var(--fu-white, #ffffff);border-radius:24px;box-shadow:0 1px 4px #0000003d;display:flex;justify-content:center;align-items:center;cursor:pointer;position:absolute;right:42px;bottom:96px}:host .tableWrap .fu-button-return-top fusion-icon.fu-return-top-icon{width:32px;height:32px}:host .tableWrap .fu-button-return-top fusion-icon.fu-return-top-icon ::ng-deep svg{width:32px;height:32px}:host .tableWrap .fu-button-return-top fusion-icon.fu-return-top-icon ::ng-deep svg *{fill:var(--fu-light-800, #8E959D)}:host .tableWrap .fu-button-return-top:hover fusion-icon.fu-return-top-icon ::ng-deep svg{width:32px;height:32px}:host .tableWrap .fu-button-return-top:hover fusion-icon.fu-return-top-icon ::ng-deep svg *{fill:var(--fu-black-500, #53575B)}:host .tableWrap.is-empty .tableWrap table thead td.is-sort,:host .tableWrap.is-loading .tableWrap table thead td.is-sort{cursor:default;pointer-events:none}:host .tableWrap.is-empty .is-overlay-loader-holder,:host .tableWrap.is-loading .is-overlay-loader-holder{position:absolute;z-index:2;width:100%;height:100%;min-height:100px;top:42px;background-color:#ffffffe6}:host .fu-table-header{height:56px;width:100%;display:flex;align-items:center;border-bottom:1px solid var(--fu-light-400, #DDDFE1)}:host .fu-table-header .fu-table-label{color:var(--fu-black-500, #53575B);padding:19px;display:flex;align-items:center;gap:4px;line-height:16px}:host .fu-table-header .fu-table-label fusion-icon.fu-info-icon{width:16px;height:16px}:host .fu-table-header .fu-table-label fusion-icon.fu-info-icon ::ng-deep svg{width:16px;height:16px}:host .fu-table-header .fu-table-label fusion-icon.fu-info-icon ::ng-deep svg *{fill:var(--fu-light-500, #D2D5D8)}:host .fu-table-header .fu-search-holder{flex-grow:2;height:100%;border-left:solid 1px var(--fu-light-400, #DDDFE1);padding-left:8px;display:flex;align-items:center}:host .fu-table-header .fu-search-holder fusion-icon.fu-search-icon{width:16px;height:16px}:host .fu-table-header .fu-search-holder fusion-icon.fu-search-icon ::ng-deep svg{width:16px;height:16px}:host .fu-table-header .fu-search-holder fusion-icon.fu-search-icon ::ng-deep svg *{fill:var(--fu-light-700, #A9AFB4)}:host .fu-table-header .fu-search-holder input{width:calc(100% - 30px);border:none;box-sizing:border-box;padding:10px;color:var(--fu-black-500, #53575B)}:host .fu-table-header .fu-search-holder input::placeholder{color:var(--fu-light-800, #8E959D)}:host .fu-table-header .fu-search-holder input:active,:host .fu-table-header .fu-search-holder input:focus{outline:none}:host .fu-table-footer{height:72px;width:100%;display:flex;align-items:center}:host.fu-no-table-frame{border:initial;border-radius:initial}:host.fu-no-table-frame .tableWrap{height:100%}:host.fu-no-table-frame .fu-button-return-top{bottom:24px}:host.fixed-table{position:relative}:host.fixed-table .tableWrap{height:calc(100% - 128px)}:host.fixed-table .tableWrap table thead{border-bottom:none}:host.fixed-table .tableWrap table thead td{height:40px;position:sticky;top:0;z-index:3;background-color:var(--fu-white, #ffffff)}:host.fixed-table .tableWrap table thead td.sticky-left{left:0;z-index:4}:host.fixed-table .tableWrap.fu-stocky-to-external{display:initial}:host.fixed-table .tableWrap+.fu-table-footer{border-top:solid 1px var(--fu-light-400, #DDDFE1)}:host.fixed-table:after{content:\"\";position:absolute;right:0;top:57px;background-color:transparent;width:16px;height:40px;border-bottom:2px solid var(--table-header-bottom-border-color, var(--fu-light-400, #DDDFE1));box-sizing:border-box}:host.fixed-table.fu-no-table-frame .tableWrap{height:100%}:host.fixed-table.fu-no-table-frame:after{top:1px}:host.fu-no-table-footer{border-bottom-left-radius:0;border-bottom-right-radius:0}:host.is-empty .fu-table-footer{border-top:1px solid var(--fu-light-400, #DDDFE1)}\n"] }]
    }], () => [{ type: i1.TableService }, { type: i2.UniqueIdService }, { type: i0.ChangeDetectorRef }, { type: i0.Injector }], { id: [{
            type: Input
        }], options: [{
            type: Input
        }], columns: [{
            type: Input
        }], rows: [{
            type: Input
        }], loading: [{
            type: Input
        }], sortTableOnDataChanges: [{
            type: Input
        }], expandedRows: [{
            type: Input
        }], testId: [{
            type: Input
        }], sortChanged: [{
            type: Output
        }], selectionChanged: [{
            type: Output
        }], rowModelChange: [{
            type: Output
        }], rowClicked: [{
            type: Output
        }], scrollDown: [{
            type: Output
        }], rowActionClicked: [{
            type: Output
        }], expandRow: [{
            type: Output
        }], expandedRowsChange: [{
            type: Output
        }], stringCell: [{
            type: ViewChild,
            args: ['stringCell']
        }], checkboxCell: [{
            type: ViewChild,
            args: ['checkboxCell']
        }], templateCell: [{
            type: ViewChild,
            args: ['templateCell']
        }], tableElement: [{
            type: ViewChild,
            args: ['table']
        }], tableWrapperElement: [{
            type: ViewChild,
            args: ['tableWrapper', { static: true }]
        }], tableBodyComponent: [{
            type: ViewChild,
            args: ['tableBody']
        }], isFixedHeader: [{
            type: HostBinding,
            args: ['class.fixed-table']
        }], noTableFrame: [{
            type: HostBinding,
            args: ['class.fu-no-table-frame']
        }], noTableFooter: [{
            type: HostBinding,
            args: ['class.fu-no-table-footer']
        }], isEmpty: [{
            type: HostBinding,
            args: ['class.is-empty']
        }], isLoading: [{
            type: HostBinding,
            args: ['class.is-loading']
        }], isScrollRight: [{
            type: HostBinding,
            args: ['class.on-scroll-right']
        }], onVerticalScroll: [{
            type: HostBinding,
            args: ['class.on-vertical-scroll']
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TableComponent, { className: "TableComponent", filePath: "table.component.ts", lineNumber: 44 }); })();
//# sourceMappingURL=data:application/json;base64, 