import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostBinding, Inject, Input, Optional, Output, ViewChild } from '@angular/core';
import { BehaviorSubject, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { ReactiveFormsModule } from '@angular/forms';
import { isBoolean, isNull, isNullOrUndefined } from '@ironsource/fusion-ui/utils';
import { TableService } from '@ironsource/fusion-ui/components/table/common/services';
import { InputInlineComponent } from '@ironsource/fusion-ui/components/input-inline/v4';
import { 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 { MenuDropComponent } from '@ironsource/fusion-ui/components/menu-drop/v4';
import { TooltipPosition } from '@ironsource/fusion-ui/components/tooltip/common/base';
import { CommonModule } from '@angular/common';
import { NotAvailablePipe } from '@ironsource/fusion-ui/pipes/not-available';
import { TooltipDirective } from '@ironsource/fusion-ui/components/tooltip/v4';
import { CheckboxComponent } from '@ironsource/fusion-ui/components/checkbox/v4';
import { DynamicComponentsModule } from '@ironsource/fusion-ui/components/dynamic-components/v1';
import { IconModule } from '@ironsource/fusion-ui/components/icon/v1';
import { IconButtonComponent } from '@ironsource/fusion-ui/components/button/v4';
import { ClickOutsideModule } from '@ironsource/fusion-ui/directives/click-outside';
import { TeleportingModule } from '@ironsource/fusion-ui/directives/teleporting';
import { RepositionDirective } from '@ironsource/fusion-ui/directives/reposition';
import { ToggleComponent } from '@ironsource/fusion-ui/components/toggle/v4';
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/dynamic-components/v1";
import * as i5 from "@ironsource/fusion-ui/directives/click-outside";
import * as i6 from "@ironsource/fusion-ui/directives/teleporting";
const _c0 = ["inlineInput"];
const _c1 = ["fusionTableCell", ""];
const _c2 = a0 => ({ $implicit: a0 });
const _c3 = (a0, a1) => ({ y: a0, x: a1 });
function TableCellComponent_Conditional_0_Conditional_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 4)(1, "span", 5);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "notAvailable");
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("width", ctx_r0.innerElementWidth);
    i0.ɵɵproperty("ngClass", ctx_r0.column.align);
    i0.ɵɵadvance();
    i0.ɵɵproperty("fusionTooltip", ctx_r0.cellStringData);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(3, 5, ctx_r0.cellStringData, ctx_r0.notAvailableText));
} }
function TableCellComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, TableCellComponent_Conditional_0_Conditional_0_Template, 4, 8, "div", 3);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵconditional(ctx_r0.cellStringData ? 0 : -1);
} }
function TableCellComponent_Conditional_1_Conditional_0_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 11)(1, "fusion-checkbox", 12);
    i0.ɵɵlistener("changed", function TableCellComponent_Conditional_1_Conditional_0_Template_fusion_checkbox_changed_1_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.selectedChange.emit($event)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("width", ctx_r0.innerElementWidth);
    i0.ɵɵadvance();
    i0.ɵɵproperty("checked", ctx_r0.isRowChecked());
} }
function TableCellComponent_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    const _r3 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div")(1, "fusion-toggle", 13);
    i0.ɵɵpipe(2, "async");
    i0.ɵɵlistener("modelChange", function TableCellComponent_Conditional_1_Conditional_1_Template_fusion_toggle_modelChange_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onToggleChanged($event)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("width", ctx_r0.innerElementWidth);
    i0.ɵɵadvance();
    i0.ɵɵproperty("model", ctx_r0.data)("disabled", ctx_r0.isReadOnly)("loading", i0.ɵɵpipeBind1(2, 5, ctx_r0.toggleInRequest$));
} }
function TableCellComponent_Conditional_1_Conditional_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 15)(1, "fusion-input-inline", 16, 2);
    i0.ɵɵpipe(3, "async");
    i0.ɵɵpipe(4, "async");
    i0.ɵɵlistener("onSave", function TableCellComponent_Conditional_1_Conditional_2_Conditional_0_Template_fusion_input_inline_onSave_1_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onEndEdit($event)); })("onCancel", function TableCellComponent_Conditional_1_Conditional_2_Conditional_0_Template_fusion_input_inline_onCancel_1_listener() { i0.ɵɵrestoreView(_r4); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onCancel()); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(3);
    i0.ɵɵclassProp("fu-type-number", ctx_r0.column.inputType);
    i0.ɵɵadvance();
    i0.ɵɵproperty("type", ctx_r0.column.inputType)("data", ctx_r0.data)("selectOptions", ctx_r0.column.inlineDropdownOptions)("pending", i0.ɵɵpipeBind1(3, 9, ctx_r0.isInRequest$))("error", i0.ɵɵpipeBind1(4, 11, ctx_r0.inputError$))("readOnly", ctx_r0.isReadOnly)("currencyPipeParameters", ctx_r0.column == null ? null : ctx_r0.column.currencyPipeParameters);
} }
function TableCellComponent_Conditional_1_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, TableCellComponent_Conditional_1_Conditional_2_Conditional_0_Template, 5, 13, "div", 14);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵconditional(!ctx_r0.isRowTotal ? 0 : -1);
} }
function TableCellComponent_Conditional_1_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-dynamic-components", 8);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("configuration", ctx_r0.customCellData);
} }
function TableCellComponent_Conditional_1_Conditional_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵpipe(1, "currency");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "currency");
    i0.ɵɵpipe(4, "notAvailable");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("width", ctx_r0.innerElementWidth);
    i0.ɵɵproperty("ngClass", ctx_r0.column.align || "right")("fusionTooltip", i0.ɵɵpipeBind2(1, 5, ctx_r0.data, "USD"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", !ctx_r0.isNull(ctx_r0.data) ? i0.ɵɵpipeBind4(3, 8, ctx_r0.data, (ctx_r0.column == null ? null : ctx_r0.column.currencyPipeParameters == null ? null : ctx_r0.column.currencyPipeParameters.currencyCode) || undefined, (ctx_r0.column == null ? null : ctx_r0.column.currencyPipeParameters == null ? null : ctx_r0.column.currencyPipeParameters.display) || ((ctx_r0.column == null ? null : ctx_r0.column.currencyPipeParameters) ? undefined : "$"), (ctx_r0.column == null ? null : ctx_r0.column.currencyPipeParameters == null ? null : ctx_r0.column.currencyPipeParameters.digitsInfo) || undefined) : i0.ɵɵpipeBind2(4, 13, ctx_r0.data, ctx_r0.notAvailableText), " ");
} }
function TableCellComponent_Conditional_1_Conditional_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵpipe(1, "number");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "number");
    i0.ɵɵpipe(4, "notAvailable");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("width", ctx_r0.innerElementWidth);
    i0.ɵɵproperty("ngClass", ctx_r0.column.align || "right")("fusionTooltip", i0.ɵɵpipeBind2(1, 5, ctx_r0.data, ctx_r0.column.pipeOptions));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", !ctx_r0.isNull(ctx_r0.data) ? i0.ɵɵpipeBind2(3, 8, ctx_r0.data, ctx_r0.column.pipeOptions) : i0.ɵɵpipeBind2(4, 11, ctx_r0.data, ctx_r0.notAvailableText), " ");
} }
function TableCellComponent_Conditional_1_Conditional_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵpipe(1, "number");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "number");
    i0.ɵɵpipe(4, "notAvailable");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleProp("width", ctx_r0.innerElementWidth);
    i0.ɵɵpropertyInterpolate1("fusionTooltip", "", i0.ɵɵpipeBind2(1, 7, ctx_r0.data, ctx_r0.column.pipeOptions), "%");
    i0.ɵɵproperty("ngClass", ctx_r0.column.align || "right");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2(" ", !ctx_r0.isNull(ctx_r0.data) ? i0.ɵɵpipeBind2(3, 10, ctx_r0.data, ctx_r0.column.pipeOptions) : i0.ɵɵpipeBind2(4, 13, ctx_r0.data, ctx_r0.notAvailableText), " ", !ctx_r0.isNullOrUndefined(ctx_r0.data) ? "%" : null, " ");
} }
function TableCellComponent_Conditional_1_Conditional_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "date");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1(" ", ctx_r0.data ? ctx_r0.isAsDate(ctx_r0.data) ? i0.ɵɵpipeBind3(2, 1, ctx_r0.data, ctx_r0.getDateFormat(ctx_r0.column.dateFormat), ctx_r0.getDateUTCFormat(ctx_r0.column.ignoreTimeZone)) : ctx_r0.data : !ctx_r0.isRowTotal ? "No " + ctx_r0.column.title : "", " ");
} }
function TableCellComponent_Conditional_1_Conditional_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate1("\u00A0", ctx_r0.column.type, "");
} }
function TableCellComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, TableCellComponent_Conditional_1_Conditional_0_Template, 2, 3, "div", 6)(1, TableCellComponent_Conditional_1_Conditional_1_Template, 3, 7, "div", 7)(2, TableCellComponent_Conditional_1_Conditional_2_Template, 1, 1)(3, TableCellComponent_Conditional_1_Conditional_3_Template, 1, 1, "fusion-dynamic-components", 8)(4, TableCellComponent_Conditional_1_Conditional_4_Template, 5, 16, "div", 9)(5, TableCellComponent_Conditional_1_Conditional_5_Template, 5, 14, "div", 9)(6, TableCellComponent_Conditional_1_Conditional_6_Template, 5, 16, "div", 9)(7, TableCellComponent_Conditional_1_Conditional_7_Template, 3, 5, "div", 10)(8, TableCellComponent_Conditional_1_Conditional_8_Template, 2, 1, "div");
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵconditional(ctx_r0.tableService.isTypeCheckbox(ctx_r0.column) && ctx_r0.isBoolean(ctx_r0.data) ? 0 : ctx_r0.tableService.isTypeToggleButton(ctx_r0.column) && ctx_r0.isBoolean(ctx_r0.data) ? 1 : ctx_r0.tableService.isTypeInputEdit(ctx_r0.column) && ctx_r0.data ? 2 : ctx_r0.tableService.isTypeComponent(ctx_r0.column) ? 3 : ctx_r0.tableService.isTypeCurrency(ctx_r0.column) ? 4 : ctx_r0.tableService.isTypeNumber(ctx_r0.column) ? 5 : ctx_r0.tableService.isTypePercent(ctx_r0.column) ? 6 : ctx_r0.tableService.isTypeDate(ctx_r0.column) ? 7 : 8);
} }
function TableCellComponent_Conditional_2_ng_container_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0, 20);
} if (rf & 2) {
    i0.ɵɵnextContext(2);
    const removeActionButton_r5 = i0.ɵɵreference(4);
    i0.ɵɵproperty("ngTemplateOutlet", removeActionButton_r5);
} }
function TableCellComponent_Conditional_2_ng_container_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0, 21);
} if (rf & 2) {
    const rowActions_r6 = ctx.ngIf;
    i0.ɵɵnextContext(2);
    const multipleActionsMenu_r7 = i0.ɵɵreference(6);
    i0.ɵɵproperty("ngTemplateOutlet", multipleActionsMenu_r7)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c2, rowActions_r6.actions));
} }
function TableCellComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, TableCellComponent_Conditional_2_ng_container_0_Template, 1, 1, "ng-container", 18)(1, TableCellComponent_Conditional_2_ng_container_1_Template, 1, 4, "ng-container", 19);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r0.isRemove && !ctx_r0.isReadOnly);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r0.multipleActions);
} }
function TableCellComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    const _r8 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 22)(1, "fusion-icon-button", 23);
    i0.ɵɵlistener("click", function TableCellComponent_ng_template_3_Template_fusion_icon_button_click_1_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onRowRemoveClicked($event)); });
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("iconName", ctx_r0.cellRemoveActionIcon)("fusionTooltip", ctx_r0.getRemoveIconTooltipText());
} }
function TableCellComponent_ng_template_5_Conditional_3_fusion_menu_drop_0_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "fusion-menu-drop", 28);
    i0.ɵɵlistener("fusionClickOutside", function TableCellComponent_ng_template_5_Conditional_3_fusion_menu_drop_0_Template_fusion_menu_drop_fusionClickOutside_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.onActionMenuClickOutSide($event)); })("menuItemClicked", function TableCellComponent_ng_template_5_Conditional_3_fusion_menu_drop_0_Template_fusion_menu_drop_menuItemClicked_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.menuItemClicked($event)); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const menuActions_r11 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("fusionReposition", "#" + ctx_r0.actionsMenuButtonId)("fusionRepositionPlacement", ctx_r0.floatingMenuPosition)("fusionRepositionOffset", i0.ɵɵpureFunction2(4, _c3, -32, -32))("menuItems", menuActions_r11);
} }
function TableCellComponent_ng_template_5_Conditional_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, TableCellComponent_ng_template_5_Conditional_3_fusion_menu_drop_0_Template, 1, 7, "fusion-menu-drop", 27);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("fusionTeleporting", "#" + ctx_r0.options.tableId + "_tableTeleportWrapper");
} }
function TableCellComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 24);
    i0.ɵɵpipe(1, "async");
    i0.ɵɵelementStart(2, "fusion-icon-button", 25);
    i0.ɵɵlistener("click", function TableCellComponent_ng_template_5_Template_fusion_icon_button_click_2_listener() { i0.ɵɵrestoreView(_r9); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onActionButtonClicked()); });
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(3, TableCellComponent_ng_template_5_Conditional_3_Template, 1, 1, "fusion-menu-drop", 26);
    i0.ɵɵpipe(4, "async");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵclassProp("fu-row-menu-shown", i0.ɵɵpipeBind1(1, 5, ctx_r0.shownActionsMenu$));
    i0.ɵɵpropertyInterpolate("id", ctx_r0.actionsMenuButtonId);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("iconName", "ph/dots-three");
    i0.ɵɵadvance();
    i0.ɵɵconditional(i0.ɵɵpipeBind1(4, 7, ctx_r0.shownActionsMenu$) ? 3 : -1);
} }
export class TableCellComponent {
    set data(value) {
        this._data = value;
    }
    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, elementRef) {
        this.tableService = tableService;
        this.tableModuleOptions = tableModuleOptions;
        this.logService = logService;
        this.elementRef = elementRef;
        this.options = null;
        this.customClass = {};
        this.selectedChange = new EventEmitter();
        this.dataChange = new EventEmitter();
        this.remove = new EventEmitter();
        this.isInlineRemovable = false;
        this.isInRequest$ = new BehaviorSubject(false);
        this.toggleInRequest$ = new BehaviorSubject(false);
        this.innerElementWidth = '';
        this.isInEditMode = false;
        this.inputError$ = new BehaviorSubject('');
        this.isNull = isNull;
        this.isNullOrUndefined = isNullOrUndefined;
        this.floatingMenuPosition = TooltipPosition.BottomRight;
        this.shownActionsMenu$ = new BehaviorSubject(false);
        this.inlineInputViewOnlyText = '';
        this.onActionMenuClose$ = new Subject();
    }
    ngOnInit() {
        const { paddingLeft, paddingRight } = this.getSellLefRightPadding();
        this.innerElementWidth = this.column.width ? `calc(${this.column.width} - ${paddingLeft} - ${paddingRight})` : null;
        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) {
        this.toggleInRequest$.next(true);
        this.dataChange.emit({
            newValue,
            onCellRequestDone: (isSuccess, error, stayInEditMode = false) => {
                if (isSuccess) {
                    this.data = newValue;
                }
                else {
                    this.data = !newValue;
                }
                this.toggleInRequest$.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?.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.closeActionsMenu();
        this.tableService.rowActionClicked.emit({ action: action, rowIndex: this.rowIndex, row: this.row });
    }
    onActionButtonClicked() {
        this.shownActionsMenu$.next(true);
        this.tableService.tableScrolled.pipe(takeUntil(this.onActionMenuClose$)).subscribe($event => {
            this.closeActionsMenu();
        });
    }
    onActionMenuClickOutSide(target) {
        if (!target.closest('#' + this.actionsMenuButtonId)) {
            this.closeActionsMenu();
        }
    }
    closeActionsMenu() {
        this.shownActionsMenu$.next(false);
        this.onActionMenuClose$.next();
        this.onActionMenuClose$.complete();
    }
    _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;
    }
    getSellLefRightPadding() {
        const computedStyle = getComputedStyle(this.elementRef.nativeElement);
        const paddingLeft = computedStyle.paddingLeft;
        const paddingRight = computedStyle.paddingRight;
        return { paddingLeft, paddingRight };
    }
    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(__ngFactoryType__) { return new (__ngFactoryType__ || TableCellComponent)(i0.ɵɵdirectiveInject(i1.TableService), i0.ɵɵdirectiveInject(TABLE_OPTIONS_TOKEN, 8), i0.ɵɵdirectiveInject(i2.LogService), i0.ɵɵdirectiveInject(i0.ElementRef)); }; }
    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: 6, hostBindings: function TableCellComponent_HostBindings(rf, ctx) { if (rf & 2) {
            i0.ɵɵstyleProp("left", ctx.stickyLeft);
            i0.ɵɵclassProp("is-inline-removable", ctx.isInlineRemovable)("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" }, standalone: true, features: [i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature], attrs: _c1, decls: 7, vars: 2, consts: [["removeActionButton", ""], ["multipleActionsMenu", ""], ["inlineInput", ""], [3, "ngClass", "width"], [3, "ngClass"], [1, "truncate", 3, "fusionTooltip"], [1, "checkbox-cell", 3, "width"], [3, "width"], [3, "configuration"], [1, "truncate", 3, "ngClass", "width", "fusionTooltip"], [1, "truncate"], [1, "checkbox-cell"], ["title", "select / un-select row", 1, "is-regular", 3, "changed", "checked"], [3, "modelChange", "model", "disabled", "loading"], [1, "fu-input-cell", 3, "fu-type-number"], [1, "fu-input-cell"], [3, "onSave", "onCancel", "type", "data", "selectOptions", "pending", "error", "readOnly", "currencyPipeParameters"], [1, "truncate", 3, "ngClass", "fusionTooltip"], [3, "ngTemplateOutlet", 4, "ngIf"], [3, "ngTemplateOutlet", "ngTemplateOutletContext", 4, "ngIf"], [3, "ngTemplateOutlet"], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "fu-button-holder"], [3, "click", "iconName", "fusionTooltip"], [1, "fu-button-holder", 3, "id"], [3, "click", "iconName"], [2, "--fu-drop-menu-width", "200px", 3, "fusionReposition", "fusionRepositionPlacement", "fusionRepositionOffset", "menuItems"], ["style", "--fu-drop-menu-width: 200px", 3, "fusionReposition", "fusionRepositionPlacement", "fusionRepositionOffset", "menuItems", "fusionClickOutside", "menuItemClicked", 4, "fusionTeleporting"], [2, "--fu-drop-menu-width", "200px", 3, "fusionClickOutside", "menuItemClicked", "fusionReposition", "fusionRepositionPlacement", "fusionRepositionOffset", "menuItems"]], template: function TableCellComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵtemplate(0, TableCellComponent_Conditional_0_Template, 1, 1)(1, TableCellComponent_Conditional_1_Template, 9, 1)(2, TableCellComponent_Conditional_2_Template, 2, 2)(3, TableCellComponent_ng_template_3_Template, 2, 2, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(5, TableCellComponent_ng_template_5_Template, 5, 9, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            i0.ɵɵconditional(ctx.isRowTotal && ctx.tableService.isInTotalTypeString(ctx.column) || ctx.tableService.isTypeString(ctx.column) ? 0 : 1);
            i0.ɵɵadvance(2);
            i0.ɵɵconditional(!ctx.isRowTotal && ctx.isLastColumn ? 2 : -1);
        } }, dependencies: [CommonModule, i3.NgClass, i3.NgIf, i3.NgTemplateOutlet, i3.AsyncPipe, i3.DecimalPipe, i3.CurrencyPipe, i3.DatePipe, ReactiveFormsModule,
            NotAvailablePipe,
            TooltipDirective,
            CheckboxComponent,
            InputInlineComponent,
            DynamicComponentsModule, i4.DynamicComponentsComponent, IconModule,
            IconButtonComponent,
            MenuDropComponent,
            ClickOutsideModule, i5.ClickOutsideDirective, TeleportingModule, i6.TeleportingDirective, RepositionDirective,
            ToggleComponent], styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap\";.font-v4-bold[_ngcontent-%COMP%], .font-v4-tab-label-2[_ngcontent-%COMP%], .font-v4-chart-2[_ngcontent-%COMP%], .font-v4-chart-1[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:700;-webkit-font-smoothing:antialiased}.font-v4-semibold[_ngcontent-%COMP%], .font-v4-chip-label[_ngcontent-%COMP%], .font-v4-table-label[_ngcontent-%COMP%], .font-v4-button[_ngcontent-%COMP%], .font-v4-heading-6[_ngcontent-%COMP%], .font-v4-heading-5[_ngcontent-%COMP%], .font-v4-heading-4[_ngcontent-%COMP%], .font-v4-heading-3[_ngcontent-%COMP%], .font-v4-heading-2[_ngcontent-%COMP%], .font-v4-heading-1[_ngcontent-%COMP%], .font-v4-title[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:600;-webkit-font-smoothing:antialiased}.font-v4-medium[_ngcontent-%COMP%], .font-v4-tab-label-1[_ngcontent-%COMP%], .font-v4-input-label[_ngcontent-%COMP%], .font-v4-overline[_ngcontent-%COMP%], .font-v4-subtitle-2[_ngcontent-%COMP%], .font-v4-subtitle-1[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:500;-webkit-font-smoothing:antialiased}.font-v4-regular[_ngcontent-%COMP%], .font-v4-caption[_ngcontent-%COMP%], .font-v4-body-2[_ngcontent-%COMP%], [_nghost-%COMP%], .font-v4-body-1[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:400;-webkit-font-smoothing:antialiased}.font-v4-title[_ngcontent-%COMP%]{font-size:2.5rem;line-height:3rem;letter-spacing:-.055rem}.font-v4-heading-1[_ngcontent-%COMP%]{font-size:1.5rem;line-height:1.75rem;letter-spacing:-.0285rem}.font-v4-heading-2[_ngcontent-%COMP%]{font-size:1.125rem;line-height:1.75rem;letter-spacing:-.01575rem}.font-v4-heading-3[_ngcontent-%COMP%]{font-size:1rem;line-height:1.5rem;letter-spacing:-.011rem}.font-v4-heading-4[_ngcontent-%COMP%]{font-size:.875rem;line-height:1rem;letter-spacing:unset}.font-v4-heading-5[_ngcontent-%COMP%]{font-size:.8125rem;line-height:16px;letter-spacing:unset}.font-v4-heading-6[_ngcontent-%COMP%]{font-size:.75rem;line-height:.75rem;letter-spacing:0}[_nghost-%COMP%], .font-v4-body-1[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-v4-body-2[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-v4-subtitle-1[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-v4-subtitle-2[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-v4-chart-1[_ngcontent-%COMP%]{font-size:1.5rem;line-height:1.5rem;letter-spacing:-.015rem}.font-v4-chart-2[_ngcontent-%COMP%]{font-size:1.25rem;line-height:1.25rem;letter-spacing:-.0125rem}.font-v4-button[_ngcontent-%COMP%]{font-size:.875rem;line-height:1.25rem;letter-spacing:.00875rem}.font-v4-overline[_ngcontent-%COMP%]{font-size:.75rem;line-height:1rem;letter-spacing:.045rem;text-transform:uppercase}.font-v4-caption[_ngcontent-%COMP%]{font-size:.75rem;line-height:1rem}.font-v4-table-label[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1.25rem;letter-spacing:.00813rem}.font-v4-input-label[_ngcontent-%COMP%]{font-size:.8125rem;line-height:1rem;letter-spacing:.00813rem}.font-v4-tab-label-1[_ngcontent-%COMP%], .font-v4-tab-label-2[_ngcontent-%COMP%]{font-size:.875rem;line-height:1rem}.font-v4-chip-label[_ngcontent-%COMP%]{font-size:.75rem;line-height:1rem;letter-spacing:normal}[_nghost-%COMP%]   .truncate[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;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;height:var(--table-row-height);padding:var(--table-row-cell-padding);border-bottom:var(--table-border);background-color:var(--table-odd-row-background-color)}.is-checkbox-holder[_nghost-%COMP%]{width:var(--table-checkbox-cell-width)}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center;height:100%;width:100%;max-width:350px;word-break:break-all}[_nghost-%COMP%] > div.right[_ngcontent-%COMP%]{justify-content:flex-end}[_nghost-%COMP%] > div.center[_ngcontent-%COMP%]{justify-content:center}[_nghost-%COMP%] > div.checkbox-cell[_ngcontent-%COMP%]{margin:0 auto;justify-content:center}[_nghost-%COMP%] > div.fu-input-cell[_ngcontent-%COMP%]{position:relative;left:-8px}[_nghost-%COMP%] > div.fu-input-cell.fu-type-number[_ngcontent-%COMP%]{left:initial;right:-8px}[_nghost-%COMP%]   .fu-button-holder[_ngcontent-%COMP%]{display:block;position:absolute;margin:auto 0;top:0;bottom:0;right:12px;width:28px;height:28px}.fu-sticky-actions[_nghost-%COMP%]{position:sticky;right:0}.fu-sticky-actions[_nghost-%COMP%]   .fu-button-holder[_ngcontent-%COMP%]{border-left:var(--table-border);right:0;width:100%;display:flex;align-items:center;justify-content:center;height:100%}.sticky-left[_nghost-%COMP%]{position:sticky;left:0;z-index:2}.sticky-left[_nghost-%COMP%]:after{content:\"\";position:absolute;top:0;right:-1px;height:100%;width:1px;border-right:var(--table-border)}.sticky-right[_nghost-%COMP%]{position:sticky;right:0;z-index:2}.sticky-right[_nghost-%COMP%]:nth-child(1 of.sticky-right):before{content:\"\";position:absolute;top:0;left:-1px;height:100%;width:1px;border-left:var(--table-border)}.is-row-in-request[_nghost-%COMP%], .is-row-in-request   [_nghost-%COMP%]{opacity:var(--table-row-loading-opacity, .7)}tr:hover[_nghost-%COMP%], tr:hover   [_nghost-%COMP%]{background-color:var(--table-row-hover-background-color)}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TableCellComponent, [{
        type: Component,
        args: [{ selector: '[fusionTableCell]', standalone: true, imports: [
                    CommonModule,
                    ReactiveFormsModule,
                    NotAvailablePipe,
                    TooltipDirective,
                    CheckboxComponent,
                    InputInlineComponent,
                    DynamicComponentsModule,
                    IconModule,
                    IconButtonComponent,
                    MenuDropComponent,
                    ClickOutsideModule,
                    TeleportingModule,
                    RepositionDirective,
                    ToggleComponent
                ], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if ((isRowTotal && tableService.isInTotalTypeString(column)) || tableService.isTypeString(column)) {\n    <!--String Cell-->\n    @if(cellStringData){\n        <div [ngClass]=\"column.align\" [style.width]=\"innerElementWidth\">\n        <span class=\"truncate\"\n              [fusionTooltip]=\"cellStringData\">{{ cellStringData | notAvailable: notAvailableText }}</span>\n        </div>\n    }\n} @else {\n    @if (tableService.isTypeCheckbox(column) && isBoolean(data)) {\n        <div class=\"checkbox-cell\" [style.width]=\"innerElementWidth\">\n            <fusion-checkbox\n                    class=\"is-regular\"\n                    title=\"select / un-select row\"\n                    [checked]=\"isRowChecked()\"\n                    (changed)=\"selectedChange.emit($event)\"\n            ></fusion-checkbox>\n        </div>\n    } @else if (tableService.isTypeToggleButton(column) && isBoolean(data)) {\n        <div [style.width]=\"innerElementWidth\">\n            <fusion-toggle\n                [model]=\"data\"\n                [disabled]=\"isReadOnly\"\n                [loading]=\"toggleInRequest$ | async\"\n                (modelChange)=\"onToggleChanged($event)\"\n            ></fusion-toggle>\n        </div>\n    } @else if (tableService.isTypeInputEdit(column) && data) {\n        @if (!isRowTotal) {\n            <div class=\"fu-input-cell\" [class.fu-type-number]=\"column.inputType\">\n                <fusion-input-inline\n                    #inlineInput\n                    [type]=\"column.inputType\"\n                    [data]=\"data\"\n                    [selectOptions]=\"column.inlineDropdownOptions\"\n                    [pending]=\"isInRequest$ | async\"\n                    [error]=\"inputError$ | async\"\n                    [readOnly]=\"isReadOnly\"\n                    [currencyPipeParameters]=\"column?.currencyPipeParameters\"\n                    (onSave)=\"onEndEdit($event)\"\n                    (onCancel)=\"onCancel()\"\n                ></fusion-input-inline>\n            </div>\n        }\n    } @else if (tableService.isTypeComponent(column)) {\n        <fusion-dynamic-components\n                [configuration]=\"customCellData\"\n        >\n        </fusion-dynamic-components>\n    } @else if (tableService.isTypeCurrency(column)) {\n        <div class=\"truncate\"\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    } @else if (tableService.isTypeNumber(column)) {\n        <div class=\"truncate\"\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    } @else if (tableService.isTypePercent(column)) {\n        <div class=\"truncate\"\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    } @else if (tableService.isTypeDate(column)) {\n        <div class=\"truncate\">\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    } @else {\n        <div>&nbsp;{{ column.type }}</div>\n    }\n}\n\n<!--Row utility Cell icons and buttons-->\n@if (!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\"\n                  [ngTemplateOutletContext]=\"{$implicit: rowActions.actions}\"></ng-container>\n    <!--multiple actions menu-->\n}\n\n<ng-template #removeActionButton>\n    <div class=\"fu-button-holder\">\n        <fusion-icon-button [iconName]=\"cellRemoveActionIcon\"\n                            [fusionTooltip]=\"getRemoveIconTooltipText()\"\n                            (click)=\"onRowRemoveClicked($event)\"></fusion-icon-button>\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$ | async\">\n        <fusion-icon-button [iconName]=\"'ph/dots-three'\" (click)=\"onActionButtonClicked()\"></fusion-icon-button>\n        @if (shownActionsMenu$ | async) {\n            <fusion-menu-drop style=\"--fu-drop-menu-width: 200px\"\n                    *fusionTeleporting=\"'#'+options.tableId+'_tableTeleportWrapper'\"\n                    [fusionReposition]=\"'#'+actionsMenuButtonId\"\n                    [fusionRepositionPlacement]=\"floatingMenuPosition\"\n                    [fusionRepositionOffset]=\"{y:-32, x:-32}\"\n                    [menuItems]=\"menuActions\"\n                    (fusionClickOutside)=\"onActionMenuClickOutSide($event)\"\n                    (menuItemClicked)=\"menuItemClicked($event)\"\n            ></fusion-menu-drop>\n        }\n    </div>\n</ng-template>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap\";.font-v4-bold,.font-v4-tab-label-2,.font-v4-chart-2,.font-v4-chart-1{font-family:Inter,sans-serif;font-weight:700;-webkit-font-smoothing:antialiased}.font-v4-semibold,.font-v4-chip-label,.font-v4-table-label,.font-v4-button,.font-v4-heading-6,.font-v4-heading-5,.font-v4-heading-4,.font-v4-heading-3,.font-v4-heading-2,.font-v4-heading-1,.font-v4-title{font-family:Inter,sans-serif;font-weight:600;-webkit-font-smoothing:antialiased}.font-v4-medium,.font-v4-tab-label-1,.font-v4-input-label,.font-v4-overline,.font-v4-subtitle-2,.font-v4-subtitle-1{font-family:Inter,sans-serif;font-weight:500;-webkit-font-smoothing:antialiased}.font-v4-regular,.font-v4-caption,.font-v4-body-2,:host,.font-v4-body-1{font-family:Inter,sans-serif;font-weight:400;-webkit-font-smoothing:antialiased}.font-v4-title{font-size:2.5rem;line-height:3rem;letter-spacing:-.055rem}.font-v4-heading-1{font-size:1.5rem;line-height:1.75rem;letter-spacing:-.0285rem}.font-v4-heading-2{font-size:1.125rem;line-height:1.75rem;letter-spacing:-.01575rem}.font-v4-heading-3{font-size:1rem;line-height:1.5rem;letter-spacing:-.011rem}.font-v4-heading-4{font-size:.875rem;line-height:1rem;letter-spacing:unset}.font-v4-heading-5{font-size:.8125rem;line-height:16px;letter-spacing:unset}.font-v4-heading-6{font-size:.75rem;line-height:.75rem;letter-spacing:0}:host,.font-v4-body-1{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-v4-body-2{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-v4-subtitle-1{font-size:.875rem;line-height:1.25rem;letter-spacing:-.00525rem}.font-v4-subtitle-2{font-size:.8125rem;line-height:1.25rem;letter-spacing:-.00244rem}.font-v4-chart-1{font-size:1.5rem;line-height:1.5rem;letter-spacing:-.015rem}.font-v4-chart-2{font-size:1.25rem;line-height:1.25rem;letter-spacing:-.0125rem}.font-v4-button{font-size:.875rem;line-height:1.25rem;letter-spacing:.00875rem}.font-v4-overline{font-size:.75rem;line-height:1rem;letter-spacing:.045rem;text-transform:uppercase}.font-v4-caption{font-size:.75rem;line-height:1rem}.font-v4-table-label{font-size:.8125rem;line-height:1.25rem;letter-spacing:.00813rem}.font-v4-input-label{font-size:.8125rem;line-height:1rem;letter-spacing:.00813rem}.font-v4-tab-label-1,.font-v4-tab-label-2{font-size:.875rem;line-height:1rem}.font-v4-chip-label{font-size:.75rem;line-height:1rem;letter-spacing:normal}:host .truncate{white-space:nowrap;overflow:hidden;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;height:var(--table-row-height);padding:var(--table-row-cell-padding);border-bottom:var(--table-border);background-color:var(--table-odd-row-background-color)}:host.is-checkbox-holder{width:var(--table-checkbox-cell-width)}:host>div{display:flex;align-items:center;height:100%;width:100%;max-width:350px;word-break:break-all}:host>div.right{justify-content:flex-end}:host>div.center{justify-content:center}:host>div.checkbox-cell{margin:0 auto;justify-content:center}:host>div.fu-input-cell{position:relative;left:-8px}:host>div.fu-input-cell.fu-type-number{left:initial;right:-8px}:host .fu-button-holder{display:block;position:absolute;margin:auto 0;top:0;bottom:0;right:12px;width:28px;height:28px}:host.fu-sticky-actions{position:sticky;right:0}:host.fu-sticky-actions .fu-button-holder{border-left:var(--table-border);right:0;width:100%;display:flex;align-items:center;justify-content:center;height:100%}:host.sticky-left{position:sticky;left:0;z-index:2}:host.sticky-left:after{content:\"\";position:absolute;top:0;right:-1px;height:100%;width:1px;border-right:var(--table-border)}:host.sticky-right{position:sticky;right:0;z-index:2}:host.sticky-right:nth-child(1 of.sticky-right):before{content:\"\";position:absolute;top:0;left:-1px;height:100%;width:1px;border-left:var(--table-border)}:host-context(.is-row-in-request){opacity:var(--table-row-loading-opacity, .7)}:host-context(tr:hover){background-color:var(--table-row-hover-background-color)}\n"] }]
    }], () => [{ type: i1.TableService }, { type: undefined, decorators: [{
                type: Optional
            }, {
                type: Inject,
                args: [TABLE_OPTIONS_TOKEN]
            }] }, { type: i2.LogService }, { type: i0.ElementRef }], { 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']
        }], isInlineRemovable: [{
            type: HostBinding,
            args: ['class.is-inline-removable']
        }], 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: 79 }); })();
//# sourceMappingURL=data:application/json;base64, 