import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Inject, Input, Optional, Output, ViewChild } from '@angular/core';
import { isBoolean, isNull, isNullOrUndefined } from '@ironsource/fusion-ui/utils';
import { BehaviorSubject } from 'rxjs';
import { TableService } from '@ironsource/fusion-ui/components/table/common/services';
import { InputInlineComponent } from '@ironsource/fusion-ui/components/input-inline/v2';
import { CELL_PADDING, DEFAULT_REMOVE_ICON_V3, DEFAULT_REMOVE_TOOLTIP_TEXT, TABLE_OPTIONS_TOKEN, TableRowHeight } from '@ironsource/fusion-ui/components/table/common/entities';
import { ERROR_MESSAGES } from '@ironsource/fusion-ui/components/error-message';
import { LogService } from '@ironsource/fusion-ui/services/log';
import { TooltipPosition } from '@ironsource/fusion-ui/components/tooltip/common/base';
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/log";
import * as i3 from "@angular/common";
import * as i4 from "@ironsource/fusion-ui/components/icon/v1";
import * as i5 from "@ironsource/fusion-ui/components/input-inline/v3";
import * as i6 from "@ironsource/fusion-ui/components/checkbox/v2";
import * as i7 from "@ironsource/fusion-ui/components/dynamic-components/v1";
import * as i8 from "@ironsource/fusion-ui/components/tooltip/v3";
import * as i9 from "@ironsource/fusion-ui/components/toggle/v2";
import * as i10 from "@ironsource/fusion-ui/directives/click-outside";
import * as i11 from "@angular/forms";
import * as i12 from "@ironsource/fusion-ui/components/button/v3";
import * as i13 from "@ironsource/fusion-ui/components/menu-drop";
import * as i14 from "@ironsource/fusion-ui/directives/reposition";
import * as i15 from "@ironsource/fusion-ui/directives/teleporting";
import * as i16 from "@ironsource/fusion-ui/pipes/not-available";
const _c0 = ["inlineInput"];
const _c1 = ["fusionTableCell", ""];
function TableCellComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 5);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "notAvailable");
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵstyleProp("width", ctx_r0.innerElementWidth);
    i0.ɵɵproperty("ngClass", ctx_r0.column.align)("fusionTooltip", ctx_r0.cellStringData);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 5, ctx_r0.cellStringData, ctx_r0.notAvailableText), " ");
} }
function TableCellComponent_ng_template_1_div_0_Template(rf, ctx) { if (rf & 1) {
    const _r17 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 11)(1, "fusion-checkbox", 12);
    i0.ɵɵlistener("changed", function TableCellComponent_ng_template_1_div_0_Template_fusion_checkbox_changed_1_listener($event) { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r16.selectedChange.emit($event)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("checked", ctx_r8.isRowChecked())("name", "row_" + ctx_r8.position.x);
} }
function TableCellComponent_ng_template_1_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r19 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "fusion-toggle", 13);
    i0.ɵɵlistener("modelChange", function TableCellComponent_ng_template_1_div_1_Template_fusion_toggle_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r18.onToggleChanged($event)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r9 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("model", ctx_r9.data)("isDisabled", ctx_r9.isReadOnly);
} }
function TableCellComponent_ng_template_1_div_2_fusion_input_inline_1_Template(rf, ctx) { if (rf & 1) {
    const _r25 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-input-inline", 17, 18);
    i0.ɵɵlistener("onSave", function TableCellComponent_ng_template_1_div_2_fusion_input_inline_1_Template_fusion_input_inline_onSave_0_listener($event) { i0.ɵɵrestoreView(_r25); const ctx_r24 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r24.onEndEdit($event)); })("onCancel", function TableCellComponent_ng_template_1_div_2_fusion_input_inline_1_Template_fusion_input_inline_onCancel_0_listener() { i0.ɵɵrestoreView(_r25); const ctx_r26 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r26.onCancel()); });
    i0.ɵɵpipe(2, "async");
    i0.ɵɵpipe(3, "async");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r20 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("type", ctx_r20.column.inputType)("textClass", ctx_r20.customClass && ctx_r20.customClass[ctx_r20.column.key])("formControl", ctx_r20.data)("loading", i0.ɵɵpipeBind1(2, 7, ctx_r20.isInRequest$))("error", i0.ɵɵpipeBind1(3, 9, ctx_r20.inputError$))("readOnly", ctx_r20.isReadOnly)("currencyPipeParameters", ctx_r20.column == null ? null : ctx_r20.column.currencyPipeParameters);
} }
function TableCellComponent_ng_template_1_div_2_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtext(0, "\u00A0");
} }
function TableCellComponent_ng_template_1_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 14);
    i0.ɵɵtemplate(1, TableCellComponent_ng_template_1_div_2_fusion_input_inline_1_Template, 4, 11, "fusion-input-inline", 15)(2, TableCellComponent_ng_template_1_div_2_ng_template_2_Template, 1, 0, "ng-template", null, 16, i0.ɵɵtemplateRefExtractor);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const _r22 = i0.ɵɵreference(3);
    const ctx_r10 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("min-width", "calc(" + ctx_r10.column.width + " - 1px)");
    i0.ɵɵproperty("ngClass", ctx_r10.column.align);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", !ctx_r10.isRowTotal)("ngIfElse", _r22);
} }
function TableCellComponent_ng_template_1_fusion_dynamic_components_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-dynamic-components", 19);
} if (rf & 2) {
    const ctx_r11 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("configuration", ctx_r11.customCellData);
} }
function TableCellComponent_ng_template_1_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵpipe(1, "currency");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "currency");
    i0.ɵɵpipe(4, "notAvailable");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r12 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("width", ctx_r12.innerElementWidth);
    i0.ɵɵproperty("ngClass", ctx_r12.column.align || "right")("fusionTooltip", i0.ɵɵpipeBind2(1, 5, ctx_r12.data, "USD"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", !ctx_r12.isNull(ctx_r12.data) ? i0.ɵɵpipeBind4(3, 8, ctx_r12.data, (ctx_r12.column == null ? null : ctx_r12.column.currencyPipeParameters == null ? null : ctx_r12.column.currencyPipeParameters.currencyCode) || undefined, (ctx_r12.column == null ? null : ctx_r12.column.currencyPipeParameters == null ? null : ctx_r12.column.currencyPipeParameters.display) || ((ctx_r12.column == null ? null : ctx_r12.column.currencyPipeParameters) ? undefined : "$"), (ctx_r12.column == null ? null : ctx_r12.column.currencyPipeParameters == null ? null : ctx_r12.column.currencyPipeParameters.digitsInfo) || undefined) : i0.ɵɵpipeBind2(4, 13, ctx_r12.data, ctx_r12.notAvailableText), " ");
} }
function TableCellComponent_ng_template_1_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵpipe(1, "number");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "number");
    i0.ɵɵpipe(4, "notAvailable");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r13 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("width", ctx_r13.innerElementWidth);
    i0.ɵɵproperty("ngClass", ctx_r13.column.align || "right")("fusionTooltip", i0.ɵɵpipeBind2(1, 5, ctx_r13.data, ctx_r13.column.pipeOptions));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", !ctx_r13.isNull(ctx_r13.data) ? i0.ɵɵpipeBind2(3, 8, ctx_r13.data, ctx_r13.column.pipeOptions) : i0.ɵɵpipeBind2(4, 11, ctx_r13.data, ctx_r13.notAvailableText), " ");
} }
function TableCellComponent_ng_template_1_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵpipe(1, "number");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "number");
    i0.ɵɵpipe(4, "notAvailable");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r14 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("width", ctx_r14.innerElementWidth);
    i0.ɵɵpropertyInterpolate1("fusionTooltip", "", i0.ɵɵpipeBind2(1, 6, ctx_r14.data, ctx_r14.column.pipeOptions), " %");
    i0.ɵɵproperty("ngClass", ctx_r14.column.align || "right");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2(" ", !ctx_r14.isNull(ctx_r14.data) ? i0.ɵɵpipeBind2(3, 9, ctx_r14.data, ctx_r14.column.pipeOptions) : i0.ɵɵpipeBind2(4, 12, ctx_r14.data, ctx_r14.notAvailableText), " ", !ctx_r14.isNullOrUndefined(ctx_r14.data) ? "%" : null, " ");
} }
function TableCellComponent_ng_template_1_div_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 20);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "date");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r15 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r15.data ? ctx_r15.isAsDate(ctx_r15.data) ? i0.ɵɵpipeBind3(2, 1, ctx_r15.data, ctx_r15.getDateFormat(ctx_r15.column.dateFormat), ctx_r15.getDateUTCFormat(ctx_r15.column.ignoreTimeZone)) : ctx_r15.data : !ctx_r15.isRowTotal ? "No " + ctx_r15.column.title : "", " ");
} }
function TableCellComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, TableCellComponent_ng_template_1_div_0_Template, 2, 2, "div", 6)(1, TableCellComponent_ng_template_1_div_1_Template, 2, 2, "div", 2)(2, TableCellComponent_ng_template_1_div_2_Template, 4, 5, "div", 7)(3, TableCellComponent_ng_template_1_fusion_dynamic_components_3_Template, 1, 1, "fusion-dynamic-components", 8)(4, TableCellComponent_ng_template_1_div_4_Template, 5, 16, "div", 9)(5, TableCellComponent_ng_template_1_div_5_Template, 5, 14, "div", 9)(6, TableCellComponent_ng_template_1_div_6_Template, 5, 15, "div", 9)(7, TableCellComponent_ng_template_1_div_7_Template, 3, 5, "div", 10);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r1.tableService.isTypeCheckbox(ctx_r1.column) && ctx_r1.isBoolean(ctx_r1.data));
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.tableService.isTypeToggleButton(ctx_r1.column) && ctx_r1.isBoolean(ctx_r1.data));
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.tableService.isTypeInputEdit(ctx_r1.column) && ctx_r1.data);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.tableService.isTypeComponent(ctx_r1.column));
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.tableService.isTypeCurrency(ctx_r1.column));
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.tableService.isTypeNumber(ctx_r1.column));
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.tableService.isTypePercent(ctx_r1.column));
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.tableService.isTypeDate(ctx_r1.column));
} }
function TableCellComponent_ng_container_3_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0, 23);
} if (rf & 2) {
    i0.ɵɵnextContext(2);
    const _r5 = i0.ɵɵreference(5);
    i0.ɵɵproperty("ngTemplateOutlet", _r5);
} }
const _c2 = a0 => ({ $implicit: a0 });
function TableCellComponent_ng_container_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0, 24);
} if (rf & 2) {
    const rowActions_r29 = ctx.ngIf;
    i0.ɵɵnextContext(2);
    const _r7 = i0.ɵɵreference(7);
    i0.ɵɵproperty("ngTemplateOutlet", _r7)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c2, rowActions_r29.actions));
} }
function TableCellComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, TableCellComponent_ng_container_3_ng_container_1_Template, 1, 1, "ng-container", 21)(2, TableCellComponent_ng_container_3_ng_container_2_Template, 1, 4, "ng-container", 22);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r3.isRemove && !ctx_r3.isReadOnly);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r3.multipleActions);
} }
function TableCellComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    const _r31 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 25);
    i0.ɵɵlistener("click", function TableCellComponent_ng_template_4_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r31); const ctx_r30 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r30.onRowRemoveClicked($event)); });
    i0.ɵɵelement(1, "fusion-icon", 26);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵproperty("fusionTooltip", ctx_r4.getRemoveIconTooltipText());
    i0.ɵɵadvance();
    i0.ɵɵproperty("name", ctx_r4.cellRemoveActionIcon);
} }
const _c3 = a0 => ({ y: a0 });
function TableCellComponent_ng_template_6_ng_container_2_fusion_menu_drop_1_Template(rf, ctx) { if (rf & 1) {
    const _r36 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-menu-drop", 30);
    i0.ɵɵlistener("fusionClickOutside", function TableCellComponent_ng_template_6_ng_container_2_fusion_menu_drop_1_Template_fusion_menu_drop_fusionClickOutside_0_listener($event) { i0.ɵɵrestoreView(_r36); const ctx_r35 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r35.onActionMenuClickOutSide($event)); })("menuItemClicked", function TableCellComponent_ng_template_6_ng_container_2_fusion_menu_drop_1_Template_fusion_menu_drop_menuItemClicked_0_listener($event) { i0.ɵɵrestoreView(_r36); const ctx_r37 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r37.menuItemClicked($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const menuActions_r32 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r34 = i0.ɵɵnextContext();
    i0.ɵɵproperty("fusionReposition", "#" + ctx_r34.actionsMenuButtonId)("fusionRepositionPlacement", ctx_r34.floatingMenuPosition)("fusionRepositionOffset", i0.ɵɵpureFunction1(4, _c3, -32))("menuItems", menuActions_r32);
} }
function TableCellComponent_ng_template_6_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, TableCellComponent_ng_template_6_ng_container_2_fusion_menu_drop_1_Template, 1, 6, "fusion-menu-drop", 29);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r33 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵproperty("fusionTeleporting", "#" + ctx_r33.options.tableId + "_tableTeleportWrapper");
} }
function TableCellComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
    const _r40 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 27)(1, "fusion-button", 28);
    i0.ɵɵlistener("click", function TableCellComponent_ng_template_6_Template_fusion_button_click_1_listener() { i0.ɵɵrestoreView(_r40); const ctx_r39 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r39.onActionButtonClicked()); });
    i0.ɵɵelementEnd()();
    i0.ɵɵtemplate(2, TableCellComponent_ng_template_6_ng_container_2_Template, 2, 1, "ng-container", 2);
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext();
    i0.ɵɵclassProp("fu-row-menu-shown", ctx_r6.shownActionsMenu);
    i0.ɵɵpropertyInterpolate("id", ctx_r6.actionsMenuButtonId);
    i0.ɵɵadvance();
    i0.ɵɵproperty("icon", "more-vert");
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r6.shownActionsMenu);
} }
export class TableCellComponent {
    set data(value) {
        this._data = value;
    }
    get isCellEditable() {
        return this.tableService.isTypeInputEdit(this.column);
    }
    get sticky() {
        return this.column.sticky;
    }
    get stickyLeft() {
        return this.column.stickyLeftMargin;
    }
    get actionsMenuButtonId() {
        return this.options.tableId + '_' + this.rowIndex;
    }
    get data() {
        let data = this._data;
        if (Array.isArray(data)) {
            data = data[this.rowSpanIndex ?? 0];
        }
        if (!isNull(data) && this.tableService.isTypeComponent(this.column) && typeof data === 'object') {
            data['cellPosition'] = this.position;
        }
        return data;
    }
    get cellStringData() {
        if (typeof this.data === 'string' || typeof this.data === 'number') {
            return this.data;
        }
        else if (this.isRowTotal && !isNullOrUndefined(this.data)) {
            this.logService.error(new Error(`Expected data type String for cell in total row with type "totalRowTypeAsString" for column key:${this.column.key}`));
            return ' ';
        }
        else if (this.isRowTotal && isNullOrUndefined(this.data)) {
            return ' '; // for total row cell as string if data not arrive
        }
        return isNull(this.data) ? null : undefined;
    }
    get isRowTotal() {
        return !isNullOrUndefined(this.options.hasTotalsRow) && this.options.hasTotalsRow && this.position.x === 0;
    }
    get isSmallActionButton() {
        return !!this.options && !!this.options.rowHeight && this.options.rowHeight === TableRowHeight.Small;
    }
    get nativeElement() {
        return this.column && typeof this.column.renderNativeElement === 'function'
            ? this.column.renderNativeElement(this.data, this.position, this.row)
            : null;
    }
    get cellRemoveActionIcon() {
        return this.options?.remove && this.options.remove?.icon ? this.options.remove.icon : DEFAULT_REMOVE_ICON_V3;
    }
    get multipleActions() {
        const actionsMenu = this.options?.rowActionsMenu;
        if (this.options?.rowActionsMenu && Array.isArray(this.options?.rowActionsMenu.actions)) {
            actionsMenu.actions = this.options?.rowActionsMenu?.actions.map(this.setDisableStateForFloatingAction.bind(this));
        }
        return actionsMenu;
    }
    constructor(tableService, tableModuleOptions, logService) {
        this.tableService = tableService;
        this.tableModuleOptions = tableModuleOptions;
        this.logService = logService;
        this.options = null;
        this.customClass = {};
        this.selectedChange = new EventEmitter();
        this.dataChange = new EventEmitter();
        this.remove = new EventEmitter();
        this.cellBorders = true;
        this.isInlineRemovable = false;
        this.isInRequest$ = new BehaviorSubject(false);
        this.cellLRPadding = CELL_PADDING;
        this.innerElementWidth = '';
        this.isInEditMode = false;
        this.inputError$ = new BehaviorSubject('');
        this.isNull = isNull;
        this.isNullOrUndefined = isNullOrUndefined;
        this.floatingMenuPosition = TooltipPosition.BottomRight;
        this.shownActionsMenu = false;
        this.inlineInputViewOnlyText = '';
    }
    ngOnInit() {
        this.cellBorders =
            isNullOrUndefined(this.options.cellBorders) || this.tableService.isTypeCheckbox(this.column) ? true : this.options.cellBorders;
        this.innerElementWidth = this.column.width ? `calc(${this.column.width} - ${this.cellLRPadding})` : '';
        this.notAvailableText = this.options ? this.options.notAvailableText : null;
    }
    ngOnChanges(changes) {
        this.isInlineRemovable = this.isRemove;
        if (this.tableService.isTypeInputEdit(this.column) && changes?.data?.currentValue && !changes.data.firstChange) {
            this._setInputData();
        }
        if (this.tableService.isTypeComponent(this.column) && (changes?.data?.currentValue || changes?.column?.currentValue)) {
            this.renderCustomElement();
        }
        if (changes?.data?.firstChange && changes?.data?.currentValue?.value?.viewOnlyText) {
            this.inlineInputViewOnlyText = changes.data.currentValue.value.viewOnlyText;
        }
    }
    _setInputData() {
        this.initInputData = !isNullOrUndefined(this.column.dataParser)
            ? this.column.dataParser(this.data.value)
            : this.data.value;
    }
    getRemoveIconTooltipText() {
        return this.options && this.options.remove && this.options.remove.tooltip && this.options.remove.tooltip.text
            ? this.options.remove.tooltip.text
            : DEFAULT_REMOVE_TOOLTIP_TEXT;
    }
    isBoolean(variable) {
        return isBoolean(variable);
    }
    isRowChecked() {
        return this.options.isGroupedTable ? this.data : this.isRowSelected;
    }
    isAsDate(date) {
        return !isNaN(Date.parse(date.toString()));
    }
    onToggleChanged(newValue) {
        // set waiter for cell
        this.isInRequest$.next(true);
        this.dataChange.emit({
            newValue,
            onCellRequestDone: (isSuccess, error, stayInEditMode = false) => {
                if (isSuccess) {
                    this.data = newValue;
                }
                else {
                    this.data = !newValue;
                }
                this.isInRequest$.next(false);
            }
        });
    }
    onEndEdit(valuesOptions) {
        const formControl = this.data;
        if (formControl.valid) {
            this.isInEditMode = false;
            const newValue = !isNullOrUndefined(this.column.dataParser) ? this.column.dataParser(formControl.value) : formControl.value;
            const prevValue = valuesOptions.currentValue;
            const inlineInputComponent = this.inlineInputEdit;
            if (newValue !== this.initInputData) {
                this.initInputData = newValue;
                // set waiter for cell
                this.isInRequest$.next(true);
                this.dataChange.emit({
                    newValue,
                    prevValue,
                    onCellRequestDone: (isSuccess, error, stayInEditMode = false) => {
                        if (!isSuccess) {
                            if (stayInEditMode) {
                                inlineInputComponent.setEditMode$.next(newValue);
                            }
                            else {
                                this.inputError$.next(error && error.message);
                            }
                            this.initInputData = prevValue;
                        }
                        else if (this.initInputData === '') {
                            this.inputError$.next('');
                            this.initInputData = formControl.value;
                        }
                        else {
                            this.inputError$.next('');
                            const newInputValue = this.inlineInputViewOnlyText
                                ? {
                                    value: newValue,
                                    viewOnlyText: this.inlineInputViewOnlyText
                                }
                                : newValue;
                            formControl.setValue(newInputValue, {
                                emitEvent: false
                            });
                        }
                        this.isInRequest$.next(false);
                    }
                });
            }
        }
        else {
            const allErrors = formControl.errors || {};
            Object.keys(allErrors).forEach(errorKey => {
                this.inputError$.next(this._getMessage(errorKey, !isNullOrUndefined(this.column.customErrorMapping) ? this.column.customErrorMapping[errorKey] ?? {} : {}, allErrors[errorKey]));
            });
        }
    }
    onCancel() {
        this.inputError$.next('');
        this.isInEditMode = false;
    }
    onRowRemoveClicked($event) {
        if ($event) {
            $event.preventDefault();
            $event.stopPropagation();
        }
        this.remove.emit();
    }
    getDateFormat(dateFormat) {
        return dateFormat || 'd MMM yyyy';
    }
    getDateUTCFormat(ignoreTimeZone) {
        return ignoreTimeZone ? null : 'UTC';
    }
    renderCustomElement() {
        if (this.column) {
            this.customCellData = {
                component: {
                    type: this.column.component,
                    data: this.data
                },
                element: this.nativeElement
            };
        }
    }
    menuItemClicked(action) {
        this.shownActionsMenu = false;
        this.tableService.rowActionClicked.emit({ action: action, rowIndex: this.rowIndex, row: this.row });
    }
    onActionButtonClicked() {
        this.shownActionsMenu = true;
    }
    onActionMenuClickOutSide(target) {
        if (!target.closest('#' + this.actionsMenuButtonId)) {
            this.shownActionsMenu = false;
        }
    }
    _getMessage(errorKey, { errorMessageKey = '', textMapping = [] }, errorDefaults) {
        const tableModuleOptions = !isNullOrUndefined(this.tableModuleOptions) ? this.tableModuleOptions : { errorMessages: ERROR_MESSAGES };
        if (!tableModuleOptions.errorMessages) {
            tableModuleOptions.errorMessages = ERROR_MESSAGES;
        }
        let errorMessage = tableModuleOptions.errorMessages[errorMessageKey] || tableModuleOptions.errorMessages[errorKey];
        if (errorMessage) {
            errorMessage = errorMessage.replace('{NAME}', this.column.title);
            errorMessage = errorMessage.replace('{INNER-NAME}', this.column.title);
            if (textMapping && textMapping.length > 0) {
                textMapping.forEach(mappObj => {
                    errorMessage = errorMessage.replace(`{${mappObj.key}}`, mappObj.value);
                });
            }
        }
        return errorMessage;
    }
    setDisableStateForFloatingAction(menuItem) {
        return this.options?.isFloatingActionDisabled && typeof this.options?.isFloatingActionDisabled === 'function'
            ? { ...menuItem, disabled: this.options.isFloatingActionDisabled(this.row, menuItem) }
            : menuItem;
    }
    static { this.ɵfac = function TableCellComponent_Factory(t) { return new (t || TableCellComponent)(i0.ɵɵdirectiveInject(i1.TableService), i0.ɵɵdirectiveInject(TABLE_OPTIONS_TOKEN, 8), i0.ɵɵdirectiveInject(i2.LogService)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TableCellComponent, selectors: [["", "fusionTableCell", ""]], viewQuery: function TableCellComponent_Query(rf, ctx) { if (rf & 1) {
            i0.ɵɵviewQuery(_c0, 5);
        } if (rf & 2) {
            let _t;
            i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.inlineInputEdit = _t.first);
        } }, hostVars: 10, hostBindings: function TableCellComponent_HostBindings(rf, ctx) { if (rf & 2) {
            i0.ɵɵstyleProp("left", ctx.stickyLeft);
            i0.ɵɵclassProp("cell-borders", ctx.cellBorders)("is-inline-removable", ctx.isInlineRemovable)("is-editable", ctx.isCellEditable)("sticky-left", ctx.sticky);
        } }, inputs: { data: "data", column: "column", row: "row", rowIndex: "rowIndex", rowSpanIndex: "rowSpanIndex", options: "options", position: "position", infoIconTooltip: "infoIconTooltip", isRemove: "isRemove", floatingActionsDisabled: "floatingActionsDisabled", isRowSelected: "isRowSelected", isLastColumn: "isLastColumn", customClass: "customClass", isReadOnly: "isReadOnly" }, outputs: { selectedChange: "selectedChange", dataChange: "dataChange", remove: "remove" }, features: [i0.ɵɵNgOnChangesFeature], attrs: _c1, decls: 8, vars: 3, consts: [[4, "ngIf", "ngIfElse"], ["notStringColumnType", ""], [4, "ngIf"], ["removeActionButton", ""], ["multipleActionsMenu", ""], [1, "truncate", "centerVertical", 3, "ngClass", "fusionTooltip"], ["class", "checkbox-cell", 4, "ngIf"], ["class", "inputType", 3, "min-width", "ngClass", 4, "ngIf"], [3, "configuration", 4, "ngIf"], ["class", "truncate centerVertical", 3, "ngClass", "width", "fusionTooltip", 4, "ngIf"], ["class", "truncate centerVertical", 4, "ngIf"], [1, "checkbox-cell"], ["title", "select / un-select row", 1, "is-regular", 3, "checked", "name", "changed"], ["size", "small", "customCheckedBackgroundColor", "#3083FF", 3, "model", "isDisabled", "modelChange"], [1, "inputType", 3, "ngClass"], [3, "type", "textClass", "formControl", "loading", "error", "readOnly", "currencyPipeParameters", "onSave", "onCancel", 4, "ngIf", "ngIfElse"], ["noEditCell", ""], [3, "type", "textClass", "formControl", "loading", "error", "readOnly", "currencyPipeParameters", "onSave", "onCancel"], ["inlineInput", ""], [3, "configuration"], [1, "truncate", "centerVertical"], [3, "ngTemplateOutlet", 4, "ngIf"], [3, "ngTemplateOutlet", "ngTemplateOutletContext", 4, "ngIf"], [3, "ngTemplateOutlet"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "fu-cell-action-button", 3, "fusionTooltip", "click"], [1, "fu-table-action-icon", 3, "name"], [1, "fu-button-holder", 3, "id"], [1, "transparent", "third", "fu-menu-drop-button", 3, "icon", "click"], [3, "fusionReposition", "fusionRepositionPlacement", "fusionRepositionOffset", "menuItems", "fusionClickOutside", "menuItemClicked", 4, "fusionTeleporting"], [3, "fusionReposition", "fusionRepositionPlacement", "fusionRepositionOffset", "menuItems", "fusionClickOutside", "menuItemClicked"]], template: function TableCellComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, TableCellComponent_ng_container_0_Template, 4, 8, "ng-container", 0)(1, TableCellComponent_ng_template_1_Template, 8, 8, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor)(3, TableCellComponent_ng_container_3_Template, 3, 2, "ng-container", 2)(4, TableCellComponent_ng_template_4_Template, 2, 2, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor)(6, TableCellComponent_ng_template_6_Template, 3, 5, "ng-template", null, 4, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            const _r2 = i0.ɵɵreference(2);
            i0.ɵɵproperty("ngIf", ctx.isRowTotal && ctx.tableService.isInTotalTypeString(ctx.column) || ctx.tableService.isTypeString(ctx.column))("ngIfElse", _r2);
            i0.ɵɵadvance(3);
            i0.ɵɵproperty("ngIf", !ctx.isRowTotal && ctx.isLastColumn);
        } }, dependencies: [i3.NgClass, i3.NgIf, i3.NgTemplateOutlet, i4.IconComponent, i5.InputInlineComponent, i6.CheckboxComponent, i7.DynamicComponentsComponent, i8.TooltipDirective, i9.ToggleComponent, i10.ClickOutsideDirective, i11.NgControlStatus, i11.FormControlDirective, i12.ButtonComponent, i13.MenuDropComponent, i14.RepositionDirective, i15.TeleportingDirective, i3.AsyncPipe, i3.DecimalPipe, i3.CurrencyPipe, i3.DatePipe, i16.NotAvailablePipe], 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%], .font-bodyXSmall[_ngcontent-%COMP%], [_nghost-%COMP%], .font-bodySmall[_ngcontent-%COMP%], .font-bodyMedium[_ngcontent-%COMP%], .font-bodyLarge[_ngcontent-%COMP%]{font-family:HelveticaNeue,helvetica,sans-serif;line-height:1.5}.font-bodyXSmallStrong[_ngcontent-%COMP%], tr.is-with-totals[_nghost-%COMP%], tr.is-with-totals   [_nghost-%COMP%], .font-bodySmallStrong[_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-bodyMediumStrong[_ngcontent-%COMP%]{font-size:14px}[_nghost-%COMP%], .font-bodySmall[_ngcontent-%COMP%]{font-size:13px;letter-spacing:.24px}tr.is-with-totals[_nghost-%COMP%], tr.is-with-totals   [_nghost-%COMP%], .font-bodySmallStrong[_ngcontent-%COMP%]{font-size:13px;letter-spacing:.24px}.font-bodyXSmall[_ngcontent-%COMP%], .font-bodyXSmallStrong[_ngcontent-%COMP%]{font-size:12px;letter-spacing:.24px}.font-caption[_ngcontent-%COMP%]{font-size:11px}[_nghost-%COMP%]   .truncate[_ngcontent-%COMP%]{width:100%;display:inline-block;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}@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%]{position:relative;padding:0 16px;height:48px;box-sizing:border-box;color:var(--fu-black-500, #53575B);word-break:break-all;max-width:350px;border-top:1px solid var(--fu-light-400, #DDDFE1);border-bottom:1px solid var(--fu-light-400, #DDDFE1)}[_nghost-%COMP%]:first-child{border-left:none}[_nghost-%COMP%]:last-child{border-right:none}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{line-height:1.25;vertical-align:middle}[_nghost-%COMP%] > div.right[_ngcontent-%COMP%]{text-align:right;float:none}[_nghost-%COMP%] > div.center[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%] > div.checkbox-cell[_ngcontent-%COMP%]{margin:0 auto;text-align:center;height:14px}[_nghost-%COMP%]   .is-ellipsis-rows-2[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.is-inline-removable[_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%]{width:32px;height:32px;box-shadow:0 1px 4px #0000003d;background-color:var(--fu-white, #ffffff);border-radius:32px;position:absolute;right:12px;top:7px;display:flex;justify-content:center;align-items:center;cursor:pointer;visibility:hidden}.is-inline-removable[_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%]   fusion-icon.fu-table-action-icon[_ngcontent-%COMP%]{width:16px;height:16px}.is-inline-removable[_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%]   fusion-icon.fu-table-action-icon[_ngcontent-%COMP%]     svg{width:16px;height:16px}.is-inline-removable[_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%]   fusion-icon.fu-table-action-icon[_ngcontent-%COMP%]     svg *{fill:var(--fu-light-900, #7B838C)}.is-inline-removable[_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%]   fusion-icon.fu-table-multi-action-icon[_ngcontent-%COMP%]{width:24px;height:24px}.is-inline-removable[_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%]   fusion-icon.fu-table-multi-action-icon[_ngcontent-%COMP%]     svg{width:24px;height:24px}.is-inline-removable[_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%]   fusion-icon.fu-table-multi-action-icon[_ngcontent-%COMP%]     svg *{fill:var(--fu-light-900, #7B838C)}[_nghost-%COMP%]   fusion-icon.infoRowIcon[_ngcontent-%COMP%]{visibility:hidden;position:absolute;right:25px;top:8px}[_nghost-%COMP%]   fusion-icon.infoRowIcon[_ngcontent-%COMP%]     svg{width:11px;height:11px}[_nghost-%COMP%]   fusion-icon.infoRowIcon[_ngcontent-%COMP%]     svg *{fill:var(--fu-black-500, #53575B)}.is-editable[_nghost-%COMP%]{padding:0 8px}[_nghost-%COMP%]   .loader-holder[_ngcontent-%COMP%]{position:relative;top:9px;width:20px}[_nghost-%COMP%]   .fu-button-holder[_ngcontent-%COMP%]{display:none;position:absolute;margin:auto;right:12px;top:0;bottom:0;width:32px;height:32px}[_nghost-%COMP%]   .fu-button-holder[_ngcontent-%COMP%]   fusion-button[_ngcontent-%COMP%]{box-shadow:0 1px 4px #0000003d;border:none;background-color:var(--fu-white, #ffffff)}[_nghost-%COMP%]   .fu-button-holder[_ngcontent-%COMP%]   fusion-button[_ngcontent-%COMP%]     fusion-icon{width:24px;height:24px}[_nghost-%COMP%]   .fu-button-holder[_ngcontent-%COMP%]   fusion-button[_ngcontent-%COMP%]     fusion-icon svg{width:24px;height:24px}.is-row-height-big[_nghost-%COMP%], .is-row-height-big   [_nghost-%COMP%]{height:48px}.is-row-height-big[_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%], .is-row-height-big   [_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%]{top:10px}tr:hover.is-inline-removable[_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%], tr:hover   .is-inline-removable[_nghost-%COMP%]   div.fu-cell-action-button[_ngcontent-%COMP%]{visibility:visible}tr:hover[_nghost-%COMP%]   .fu-button-holder[_ngcontent-%COMP%], tr:hover   [_nghost-%COMP%]   .fu-button-holder[_ngcontent-%COMP%], tr.fu-hovered[_nghost-%COMP%]   .fu-button-holder[_ngcontent-%COMP%], tr.fu-hovered   [_nghost-%COMP%]   .fu-button-holder[_ngcontent-%COMP%]{display:block}tr.is-with-totals[_nghost-%COMP%], tr.is-with-totals   [_nghost-%COMP%]{height:32px;letter-spacing:.5px}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableCellComponent, [{
        type: Component,
        args: [{ selector: '[fusionTableCell]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container\n    *ngIf=\"(isRowTotal && tableService.isInTotalTypeString(column)) || tableService.isTypeString(column); else notStringColumnType\"\n>\n    <!--String Cell-->\n    <div class=\"truncate centerVertical\" [ngClass]=\"column.align\" [style.width]=\"innerElementWidth\"\n         [fusionTooltip]=\"cellStringData\">\n        {{ cellStringData | notAvailable: notAvailableText }}\n    </div>\n</ng-container>\n\n<ng-template #notStringColumnType>\n    <!--Checkbox Cell-->\n    <div *ngIf=\"tableService.isTypeCheckbox(column) && isBoolean(data)\" class=\"checkbox-cell\">\n        <fusion-checkbox\n            class=\"is-regular\"\n            title=\"select / un-select row\"\n            [checked]=\"isRowChecked()\"\n            (changed)=\"selectedChange.emit($event)\"\n            [name]=\"'row_' + position.x\"\n        ></fusion-checkbox>\n    </div>\n    <!--ToggleButton Cell-->\n    <div *ngIf=\"tableService.isTypeToggleButton(column) && isBoolean(data)\">\n        <fusion-toggle\n            [model]=\"data\"\n            [isDisabled]=\"isReadOnly\"\n            size=\"small\"\n            customCheckedBackgroundColor=\"#3083FF\"\n            (modelChange)=\"onToggleChanged($event)\"\n        ></fusion-toggle>\n    </div>\n    <!--InputEdit Cell-->\n    <div\n        *ngIf=\"tableService.isTypeInputEdit(column) && data\"\n        [style.min-width]=\"'calc(' + column.width + ' - 1px)'\"\n        class=\"inputType\"\n        [ngClass]=\"column.align\"\n    >\n        <fusion-input-inline\n            #inlineInput\n            *ngIf=\"!isRowTotal; else noEditCell\"\n            [type]=\"column.inputType\"\n            (onSave)=\"onEndEdit($event)\"\n            (onCancel)=\"onCancel()\"\n            [textClass]=\"customClass && customClass[column.key]\"\n            [formControl]=\"data\"\n            [loading]=\"isInRequest$ | async\"\n            [error]=\"inputError$ | async\"\n            [readOnly]=\"isReadOnly\"\n            [currencyPipeParameters]=\"column?.currencyPipeParameters\"\n        ></fusion-input-inline>\n        <ng-template #noEditCell>&nbsp;</ng-template>\n    </div>\n    <!--DynamicComponent Cell-->\n    <fusion-dynamic-components\n        *ngIf=\"tableService.isTypeComponent(column)\"\n        [configuration]=\"customCellData\"\n    >\n    </fusion-dynamic-components>\n    <!--Currency Cell-->\n    <div\n        *ngIf=\"tableService.isTypeCurrency(column)\"\n        class=\"truncate centerVertical\"\n        [ngClass]=\"column.align || 'right'\"\n        [style.width]=\"innerElementWidth\"\n        [fusionTooltip]=\"$any(data) | currency: 'USD'\"\n    >\n        {{\n        !isNull(data)\n            ? ($any(data)\n                | currency\n                : column?.currencyPipeParameters?.currencyCode || undefined\n                    : column?.currencyPipeParameters?.display || (column?.currencyPipeParameters ? undefined : '$')\n                    : column?.currencyPipeParameters?.digitsInfo || undefined)\n            : (data | notAvailable: notAvailableText)\n        }}\n    </div>\n    <!--Number Cell-->\n    <div\n        *ngIf=\"tableService.isTypeNumber(column)\"\n        class=\"truncate centerVertical\"\n        [ngClass]=\"column.align || 'right'\"\n        [style.width]=\"innerElementWidth\"\n        [fusionTooltip]=\"$any(data) | number: column.pipeOptions\"\n    >\n        {{ !isNull(data) ? ($any(data) | number: column.pipeOptions) : (data | notAvailable: notAvailableText) }}\n    </div>\n    <!--Percent Cell-->\n    <div\n        *ngIf=\"tableService.isTypePercent(column)\"\n        class=\"truncate centerVertical\"\n        [ngClass]=\"column.align || 'right'\"\n        [style.width]=\"innerElementWidth\"\n        fusionTooltip=\"{{ $any(data) | number: column.pipeOptions }} %\"\n    >\n        {{ !isNull(data) ? ($any(data) | number: column.pipeOptions) : (data | notAvailable: notAvailableText) }}\n        {{ !isNullOrUndefined(data) ? '%' : null }}\n    </div>\n    <!--Date Cell-->\n    <div *ngIf=\"tableService.isTypeDate(column)\" class=\"truncate centerVertical\">\n        {{\n        data\n            ? isAsDate(data)\n                ? ($any(data) | date: getDateFormat(column.dateFormat):getDateUTCFormat(column.ignoreTimeZone))\n                : data\n            : !isRowTotal\n                ? 'No ' + column.title\n                : ''\n        }}\n    </div>\n</ng-template>\n\n<!--Row utility Cell icons and buttons-->\n<ng-container *ngIf=\"!isRowTotal && isLastColumn\">\n    <!--single remove action button-->\n    <ng-container *ngIf=\"isRemove && !isReadOnly\" [ngTemplateOutlet]=\"removeActionButton\"></ng-container>\n    <!--single remove action button-->\n    <!--multiple actions menu-->\n    <ng-container *ngIf=\"multipleActions as rowActions\" [ngTemplateOutlet]=\"multipleActionsMenu\" [ngTemplateOutletContext]=\"{$implicit: rowActions.actions}\"></ng-container>\n    <!--multiple actions menu-->\n</ng-container>\n\n<ng-template #removeActionButton>\n    <div class=\"fu-cell-action-button\"\n         [fusionTooltip]=\"getRemoveIconTooltipText()\"\n         (click)=\"onRowRemoveClicked($event)\"\n    >\n        <fusion-icon class=\"fu-table-action-icon\" [name]=\"cellRemoveActionIcon\"></fusion-icon>\n    </div>\n</ng-template>\n\n<ng-template #multipleActionsMenu let-menuActions>\n    <div id=\"{{actionsMenuButtonId}}\" class=\"fu-button-holder\" [class.fu-row-menu-shown]=\"shownActionsMenu\">\n        <fusion-button class=\"transparent third fu-menu-drop-button\" [icon]=\"'more-vert'\" (click)=\"onActionButtonClicked()\"></fusion-button>\n    </div>\n    <ng-container *ngIf=\"shownActionsMenu\">\n        <fusion-menu-drop\n            *fusionTeleporting=\"'#'+options.tableId+'_tableTeleportWrapper'\"\n            [fusionReposition]=\"'#'+actionsMenuButtonId\"\n            [fusionRepositionPlacement]=\"floatingMenuPosition\"\n            [fusionRepositionOffset]=\"{y:-32}\"\n            [menuItems]=\"menuActions\"\n            (fusionClickOutside)=\"onActionMenuClickOutSide($event)\"\n            (menuItemClicked)=\"menuItemClicked($event)\"\n        ></fusion-menu-drop>\n    </ng-container>\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,.font-bodyXSmall,:host,.font-bodySmall,.font-bodyMedium,.font-bodyLarge{font-family:HelveticaNeue,helvetica,sans-serif;line-height:1.5}.font-bodyXSmallStrong,:host-context(tr.is-with-totals),.font-bodySmallStrong,.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-bodyMediumStrong{font-size:14px}:host,.font-bodySmall{font-size:13px;letter-spacing:.24px}:host-context(tr.is-with-totals),.font-bodySmallStrong{font-size:13px;letter-spacing:.24px}.font-bodyXSmall,.font-bodyXSmallStrong{font-size:12px;letter-spacing:.24px}.font-caption{font-size:11px}:host .truncate{width:100%;display:inline-block;white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes shineAnimation{0%{background-position:-750px 0}to{background-position:750px 0}}:host{position:relative;padding:0 16px;height:48px;box-sizing:border-box;color:var(--fu-black-500, #53575B);word-break:break-all;max-width:350px;border-top:1px solid var(--fu-light-400, #DDDFE1);border-bottom:1px solid var(--fu-light-400, #DDDFE1)}:host:first-child{border-left:none}:host:last-child{border-right:none}:host>div{line-height:1.25;vertical-align:middle}:host>div.right{text-align:right;float:none}:host>div.center{text-align:center}:host>div.checkbox-cell{margin:0 auto;text-align:center;height:14px}:host .is-ellipsis-rows-2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}:host.is-inline-removable div.fu-cell-action-button{width:32px;height:32px;box-shadow:0 1px 4px #0000003d;background-color:var(--fu-white, #ffffff);border-radius:32px;position:absolute;right:12px;top:7px;display:flex;justify-content:center;align-items:center;cursor:pointer;visibility:hidden}:host.is-inline-removable div.fu-cell-action-button fusion-icon.fu-table-action-icon{width:16px;height:16px}:host.is-inline-removable div.fu-cell-action-button fusion-icon.fu-table-action-icon ::ng-deep svg{width:16px;height:16px}:host.is-inline-removable div.fu-cell-action-button fusion-icon.fu-table-action-icon ::ng-deep svg *{fill:var(--fu-light-900, #7B838C)}:host.is-inline-removable div.fu-cell-action-button fusion-icon.fu-table-multi-action-icon{width:24px;height:24px}:host.is-inline-removable div.fu-cell-action-button fusion-icon.fu-table-multi-action-icon ::ng-deep svg{width:24px;height:24px}:host.is-inline-removable div.fu-cell-action-button fusion-icon.fu-table-multi-action-icon ::ng-deep svg *{fill:var(--fu-light-900, #7B838C)}:host fusion-icon.infoRowIcon{visibility:hidden;position:absolute;right:25px;top:8px}:host fusion-icon.infoRowIcon ::ng-deep svg{width:11px;height:11px}:host fusion-icon.infoRowIcon ::ng-deep svg *{fill:var(--fu-black-500, #53575B)}:host.is-editable{padding:0 8px}:host .loader-holder{position:relative;top:9px;width:20px}:host .fu-button-holder{display:none;position:absolute;margin:auto;right:12px;top:0;bottom:0;width:32px;height:32px}:host .fu-button-holder fusion-button{box-shadow:0 1px 4px #0000003d;border:none;background-color:var(--fu-white, #ffffff)}:host .fu-button-holder fusion-button ::ng-deep fusion-icon{width:24px;height:24px}:host .fu-button-holder fusion-button ::ng-deep fusion-icon svg{width:24px;height:24px}:host-context(.is-row-height-big){height:48px}:host-context(.is-row-height-big) div.fu-cell-action-button{top:10px}:host-context(tr:hover).is-inline-removable div.fu-cell-action-button{visibility:visible}:host-context(tr:hover) .fu-button-holder,:host-context(tr.fu-hovered) .fu-button-holder{display:block}:host-context(tr.is-with-totals){height:32px;letter-spacing:.5px}\n"] }]
    }], () => [{ type: i1.TableService }, { type: undefined, decorators: [{
                type: Optional
            }, {
                type: Inject,
                args: [TABLE_OPTIONS_TOKEN]
            }] }, { type: i2.LogService }], { data: [{
            type: Input
        }], column: [{
            type: Input
        }], row: [{
            type: Input
        }], rowIndex: [{
            type: Input
        }], rowSpanIndex: [{
            type: Input
        }], options: [{
            type: Input
        }], position: [{
            type: Input
        }], infoIconTooltip: [{
            type: Input
        }], isRemove: [{
            type: Input
        }], floatingActionsDisabled: [{
            type: Input
        }], isRowSelected: [{
            type: Input
        }], isLastColumn: [{
            type: Input
        }], customClass: [{
            type: Input
        }], isReadOnly: [{
            type: Input
        }], selectedChange: [{
            type: Output
        }], dataChange: [{
            type: Output
        }], remove: [{
            type: Output
        }], inlineInputEdit: [{
            type: ViewChild,
            args: ['inlineInput']
        }], cellBorders: [{
            type: HostBinding,
            args: ['class.cell-borders']
        }], isInlineRemovable: [{
            type: HostBinding,
            args: ['class.is-inline-removable']
        }], isCellEditable: [{
            type: HostBinding,
            args: ['class.is-editable']
        }], sticky: [{
            type: HostBinding,
            args: ['class.sticky-left']
        }], stickyLeft: [{
            type: HostBinding,
            args: ['style.left']
        }] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TableCellComponent, { className: "TableCellComponent", filePath: "components/table-cell/table-cell.component.ts", lineNumber: 51 }); })();
//# sourceMappingURL=data:application/json;base64, 