import * as i0 from '@angular/core';
import { Directive, HostListener, inject, Input, ViewContainerRef, Component, ViewChild, input, NgModule } from '@angular/core';
import { RowToggler, Table } from 'primeng/table';
import { TranslateService } from '@ngx-translate/core';
import { HostProjectConfigsInjectionToken } from '@seniorsistemas/angular-components/common';
import { LocaleService, applyLocalizedMask } from '@seniorsistemas/angular-components/locale';
import { NumericService } from '@seniorsistemas/angular-components/numeric';
import { TokenListComponent } from '@seniorsistemas/angular-components/token-list';
import { deepClone, isNullOrUndefined } from '@seniorsistemas/angular-components/utils';
import BigNumber from 'bignumber.js';
import moment from 'moment';
import { NgStyle, NgClass, NgTemplateOutlet } from '@angular/common';
import { TooltipDirective } from '@seniorsistemas/angular-components/tooltip';
import { BadgeComponent } from '@seniorsistemas/angular-components/badge';
import { InfoSignDirective } from '@seniorsistemas/angular-components/info-sign';
import { ButtonComponent } from '@seniorsistemas/angular-components/button';

class NavigationDirective {
    onKeyDown(event) {
        switch (event.key) {
            case 'Right': // IE 11
            case 'ArrowRight':
                if (this._isRow(event.target)) {
                    this._focusFirstColFromCurrentRow(event.target);
                }
                else if (this._isCol(event.target)) {
                    this._focusNextSelectableCol(event.target);
                }
                event.preventDefault();
                break;
            case 'Left': // IE 11
            case 'ArrowLeft':
                if (this._isRow(event.target)) {
                    this._focusLastColFromPrevRow(event.target);
                }
                else if (this._isCol(event.target)) {
                    this._focusPrevSelectableCol(event.target);
                }
                event.preventDefault();
                break;
            case 'Up': // IE 11
            case 'ArrowUp':
                if (this._isRow(event.target)) {
                    this._setPrevRowFocus(event.target);
                }
                else if (this._isCol(event.target)) {
                    this._setAboveColFocus(event.target);
                }
                event.preventDefault();
                break;
            case 'Down': // IE 11
            case 'ArrowDown':
                if (this._isRow(event.target)) {
                    this._setNextRowFocus(event.target);
                }
                else if (this._isCol(event.target)) {
                    this._setUnderColFocus(event.target);
                }
                event.preventDefault();
                break;
        }
    }
    _focusLastColFromPrevRow(event) {
        const prevRow = this._findPrevSelectableRow(event);
        if (prevRow) {
            prevRow.lastElementChild.focus();
        }
    }
    _focusFirstColFromCurrentRow(row) {
        const firstCol = row.firstElementChild;
        if (firstCol) {
            firstCol.focus();
        }
    }
    _focusNextSelectableCol(col) {
        const nextCol = col.nextElementSibling;
        if (nextCol) {
            nextCol.focus();
        }
        else {
            const currentRow = col.parentElement;
            return this._setNextRowFocus(currentRow);
        }
    }
    _focusPrevSelectableCol(col) {
        const prevCol = col.previousElementSibling;
        if (prevCol) {
            prevCol.focus();
        }
        else {
            const currentRow = col.parentElement;
            return currentRow.focus();
        }
    }
    _setAboveColFocus(currentCol) {
        const cellIndex = currentCol['cellIndex'];
        const currentRow = currentCol.parentElement;
        const prevRow = this._findPrevSelectableRow(currentRow);
        if (prevRow)
            prevRow.cells[cellIndex].focus();
    }
    _setUnderColFocus(currentCol) {
        const cellIndex = currentCol['cellIndex'];
        const currentRow = currentCol.parentElement;
        const nextRow = this._findNextSelectableRow(currentRow);
        if (nextRow)
            nextRow.cells[cellIndex].focus();
    }
    _setNextRowFocus(row) {
        const nextRow = this._findNextSelectableRow(row);
        if (nextRow) {
            nextRow.focus();
        }
    }
    _setPrevRowFocus(row) {
        const prevRow = this._findPrevSelectableRow(row);
        if (prevRow) {
            prevRow.focus();
        }
    }
    _isRow(event) {
        return event.tagName.toLocaleLowerCase() === 'tr';
    }
    _isCol(event) {
        return event.tagName.toLocaleLowerCase() === 'td';
    }
    _findPrevSelectableRow(row) {
        const prevRow = row.previousElementSibling;
        return prevRow ?? null;
    }
    _findNextSelectableRow(row) {
        const nextRow = row.nextElementSibling;
        return nextRow ?? null;
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: NavigationDirective, isStandalone: true, selector: "[sNavigation]", host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NavigationDirective, decorators: [{
            type: Directive,
            args: [{ selector: '[sNavigation]', standalone: true }]
        }], propDecorators: { onKeyDown: [{
                type: HostListener,
                args: ['keydown', ['$event']]
            }] } });

class RowTogllerDirective extends RowToggler {
    dt;
    data = null;
    constructor() {
        const dt = inject(Table);
        super(dt);
        this.dt = dt;
    }
    onKeydown(event) {
        if (this.isEnabled()) {
            switch (event.key) {
                case 'Enter':
                    this.dt.toggleRow(this.data, event);
                    event.preventDefault();
                    break;
                default:
                    event.preventDefault();
                    break;
            }
        }
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowTogllerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
    static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: RowTogllerDirective, isStandalone: true, selector: "[sRowToggler]", inputs: { data: ["sRowToggler", "data"] }, host: { listeners: { "keydown": "onKeydown($event)" } }, usesInheritance: true, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowTogllerDirective, decorators: [{
            type: Directive,
            args: [{
                    selector: '[sRowToggler]',
                    standalone: true,
                }]
        }], ctorParameters: () => [], propDecorators: { data: [{
                type: Input,
                args: [{ alias: 'sRowToggler', required: true }]
            }], onKeydown: [{
                type: HostListener,
                args: ['keydown', ['$event']]
            }] } });

var EnumColumnFieldType;
(function (EnumColumnFieldType) {
    EnumColumnFieldType["STRING"] = "STRING";
    EnumColumnFieldType["NUMBER"] = "NUMBER";
    EnumColumnFieldType["BOOLEAN"] = "BOOLEAN";
    EnumColumnFieldType["DATE"] = "DATE";
    EnumColumnFieldType["CURRENCY"] = "CURRENCY";
    EnumColumnFieldType["ENUM"] = "ENUM";
    EnumColumnFieldType["LOOKUP"] = "LOOKUP";
    EnumColumnFieldType["LINK"] = "LINK";
    EnumColumnFieldType["TOKENS"] = "TOKENS";
})(EnumColumnFieldType || (EnumColumnFieldType = {}));

var EnumBadgeColors;
(function (EnumBadgeColors) {
    EnumBadgeColors["RED"] = "red";
    EnumBadgeColors["ORANGE"] = "orange";
    EnumBadgeColors["YELLOW"] = "yellow";
    EnumBadgeColors["GREEN"] = "green";
    EnumBadgeColors["BLUE"] = "blue";
    EnumBadgeColors["GRAY"] = "gray";
})(EnumBadgeColors || (EnumBadgeColors = {}));

const convertToMomentDateFormat = (format) => {
    // A ordem dos replaces é importante.
    return format
        .replace(/\bd\b/, "D") // day of month (no leading zero)
        .replace(/\bdd\b/, "DD") // day of month
        .replace(/\bo\b/, "DDD") // day of the year (no leading zero)
        .replace(/\boo\b/, "DDDD") // day of the year
        .replace(/\bM\b/, "MMM") // month name short
        .replace(/\bMM\b/, "MMMM") // month name long
        .replace(/\bm\b/, "M") // month of year (no leading)
        .replace(/\bmm\b/, "MM") // month of year
        .replace(/\by\b/, "YY") // year (two digits)
        .replace(/\byy\b/, "YYYY"); // year (four digits)
};

/**
 * @description Componente interno que renderiza uma linha de colunas da tabela,
 * aplicando formatação localizada (data, número, moeda, token, etc.) para cada coluna.
 * Normalmente usado dentro do contexto de uma tabela PrimeNG.
 *
 * @example
 * ```html
 * <s-table-columns [columns]="colunas" [rowValue]="linha" />
 * ```
 *
 * @category Data
 */
class TableColumnsComponent {
    localeService = inject(LocaleService);
    viewContainerRef = inject(ViewContainerRef);
    translate = inject(TranslateService);
    numericService = inject(NumericService);
    hostProjectConfigs = inject(HostProjectConfigsInjectionToken);
    columnsTemplate = null;
    /** @description Lista de configurações das colunas a serem renderizadas. @default [] */
    columns = [];
    /** @description Objeto da linha com os valores a serem exibidos nas colunas. Campo obrigatório. */
    rowValue;
    /** @description Opções de localização (calendário e número) usadas para formatação. @default null */
    locale = null;
    cellsData = [];
    formattedColumns = [];
    constructor() {
        this.locale = {
            calendar: {
                ...this.localeService.getLocaleOptions()?.calendar,
                dateFormat: convertToMomentDateFormat(this.localeService.getLocaleOptions()?.calendar.dateFormat ?? ''),
            },
            number: {
                ...this.localeService.getLocaleOptions()?.number,
                scale: 0,
            },
        };
    }
    ngOnChanges(changes) {
        this.validateComponentAttributes(changes);
        if (changes['columns'] && changes['columns'].currentValue !== changes['columns'].previousValue) {
            this.columns = this.sortColumnsBySequence(changes['columns'].currentValue);
        }
        this.createColumnsTemplate(changes);
    }
    isArray(value) {
        return Array.isArray(value);
    }
    getTokensByColumn(column) {
        return column.columnValue;
    }
    getCellData(column) {
        const { columnValue, separator, uninformed } = column;
        if (typeof columnValue === 'string') {
            const splittedString = columnValue.split(separator);
            return splittedString.map((string, index) => {
                const isLastIndex = splittedString.length - 1 === index;
                return {
                    value: string,
                    isUninformed: string === uninformed,
                    separator: !isLastIndex ? separator : null,
                };
            });
        }
        return null;
    }
    validateComponentAttributes(changes) {
        if (!this.columns && !changes['columns']?.currentValue) {
            throw new Error("The 'columns' attribute must be informed!");
        }
        if (!this.rowValue && !changes['rowValue']?.currentValue) {
            throw new Error("The 'rowValue' attribute must be informed!");
        }
    }
    createColumnsTemplate(changes) {
        this.viewContainerRef.clear();
        const columns = changes['columns']?.currentValue || this.columns;
        const rowValue = deepClone(changes['rowValue']?.currentValue ?? this.rowValue);
        const locale = changes['locale']?.currentValue || this.locale;
        this.formattedColumns = columns.map((column) => this.getColumnValue(column, rowValue, locale));
        this.cellsData = this.formattedColumns.map((column) => this.getCellData(column));
        if (!isNullOrUndefined(this.columnsTemplate)) {
            this.viewContainerRef.createEmbeddedView(this.columnsTemplate);
        }
    }
    getColumnSeparator(column) {
        return column.separator ? column.separator : ' - ';
    }
    getTranslationPrefix(column) {
        return column.prefix ? column.prefix : `${this.hostProjectConfigs.domain}.${this.hostProjectConfigs.service}.`;
    }
    isAttributeValueInvalid(attributeValue) {
        return (attributeValue === null ||
            attributeValue === undefined ||
            (attributeValue?.options?.numberFormatOptions && isNullOrUndefined(attributeValue?.value)) ||
            (this.isArray(attributeValue) && !attributeValue.length) ||
            (typeof attributeValue === 'string' && attributeValue.trim() === ''));
    }
    getFormattedColumnValue(column, columnValue, unifiedColumnValues, uninformedText, uninformedNumber) {
        if (uninformedNumber === column.attributes.length) {
            return uninformedText;
        }
        if (column.type === EnumColumnFieldType.TOKENS) {
            return [].concat.apply([], columnValue.filter((values) => values !== uninformedText));
        }
        return unifiedColumnValues;
    }
    getAttributeValue(attribute, rowValue) {
        let attributeValue;
        attribute.split('/').forEach((value) => {
            if (!attributeValue) {
                value.split('.').forEach((val, i) => {
                    if (!rowValue) {
                        return;
                    }
                    if (i === 0) {
                        attributeValue = rowValue[val];
                    }
                    else {
                        if (attributeValue) {
                            attributeValue = attributeValue[val];
                        }
                    }
                });
            }
        });
        return attributeValue;
    }
    getNumberConfigs(column) {
        return {
            ...this.locale?.number,
            scale: column.scale !== null && column.scale !== undefined
                ? this.getColumnScale(column.scale)
                : this.locale?.number.scale,
            prefix: `${this.locale?.number.currencySymbol} `,
        };
    }
    getDateFormat(column, locale) {
        return column.dateFormat ? column.dateFormat : locale.calendar.dateFormat;
    }
    getColumnValue(column, rowValue, locale) {
        const prefix = this.getTranslationPrefix(column);
        const separator = this.getColumnSeparator(column);
        const uninformed = this.translate.instant(prefix + 'empty_label');
        const style = column.style;
        const columnValue = column.attributes.map((attribute) => {
            const attributeValue = this.getAttributeValue(attribute, rowValue);
            if (this.isAttributeValueInvalid(attributeValue)) {
                return uninformed;
            }
            const numberConfigs = this.getNumberConfigs(column);
            switch (column.type) {
                case EnumColumnFieldType.ENUM:
                    return this.translate.instant(column.enumPrefix + attributeValue.toString().toLowerCase());
                case EnumColumnFieldType.CURRENCY: {
                    const numberFormatOptions = attributeValue?.options?.numberFormatOptions
                        ? attributeValue.options.numberFormatOptions
                        : typeof column.numberFormatOptions === 'function'
                            ? column.numberFormatOptions({
                                rowData: rowValue,
                            })
                            : column.numberFormatOptions;
                    return numberFormatOptions
                        ? this.numericService.instant(attributeValue, {
                            numberFormatOptions,
                        })
                        : applyLocalizedMask(attributeValue, {
                            decimalSeparator: '.',
                            thousandsSeparator: ',',
                            scale: 2,
                            prefix: '',
                            suffix: '',
                            allowNegative: true,
                            ...numberConfigs,
                        }, this.isNumber(attributeValue));
                }
                case EnumColumnFieldType.DATE:
                    const dateFormat = this.getDateFormat(column, locale);
                    return moment(attributeValue).format(dateFormat);
                case EnumColumnFieldType.BOOLEAN:
                    const value = attributeValue ? 'yes' : 'no';
                    return this.translate.instant(prefix + value);
                case EnumColumnFieldType.NUMBER: {
                    numberConfigs.prefix = '';
                    const numberFormatOptions = attributeValue?.options?.numberFormatOptions
                        ? attributeValue.options.numberFormatOptions
                        : typeof column.numberFormatOptions === 'function'
                            ? column.numberFormatOptions({
                                rowData: rowValue,
                            })
                            : column.numberFormatOptions;
                    return numberFormatOptions
                        ? this.numericService.instant(attributeValue, {
                            numberFormatOptions,
                        })
                        : applyLocalizedMask(attributeValue, {
                            decimalSeparator: '.',
                            thousandsSeparator: ',',
                            scale: 2,
                            prefix: '',
                            suffix: '',
                            allowNegative: true,
                            ...numberConfigs,
                        }, this.isNumber(attributeValue));
                }
                case EnumColumnFieldType.TOKENS:
                    return this.getTokens(attributeValue);
                default:
                    return attributeValue;
            }
        });
        const unifiedColumnValues = columnValue.join(separator);
        const uninformedNumber = unifiedColumnValues.split(separator).filter((value) => value === uninformed).length;
        const formattedColumnValue = this.getFormattedColumnValue(column, columnValue, unifiedColumnValues, uninformed, uninformedNumber);
        return {
            style,
            columnValue: formattedColumnValue,
            separator,
            uninformed,
            badgeConfigs: column?.badgeConfigs?.find((badgeConfig) => badgeConfig.enumValue === rowValue[column.attributes[0] ?? column.field]),
            color: column.color?.(rowValue),
            type: column.type,
            tooltip: this.getColumnTooltip(column.tooltip),
            infoSign: this.getColumnInfoSign(column.infoSign),
            onLinkClick: column.onLinkClick,
            onColumnClick: column.onColumnClick,
            compact: column.compact,
        };
    }
    getColumnScale(scale) {
        if (typeof scale === 'function') {
            return scale(deepClone(this.rowValue));
        }
        return scale;
    }
    getColumnInfoSign(infoSign) {
        if (!isNullOrUndefined(infoSign)) {
            if (typeof infoSign === 'function') {
                return infoSign(deepClone(this.rowValue));
            }
            return infoSign;
        }
        return null;
    }
    getColumnTooltip(tooltip) {
        if (!isNullOrUndefined(tooltip)) {
            if (typeof tooltip === 'function') {
                return tooltip(deepClone(this.rowValue));
            }
            return tooltip;
        }
        return '';
    }
    isNumber(value) {
        return !new BigNumber(value).isNaN();
    }
    getTokens(values) {
        if (!this.isArray(values)) {
            throw new Error('To use tokens an array must be informed');
        }
        if (!this.isValidTokenArray(values)) {
            throw new Error('Not a valid token array. Must be a primitive values array or an objects with label attribute array');
        }
        if (this.isLabelObjectArray(values)) {
            return values;
        }
        return values
            .filter((value) => value !== undefined && value !== null)
            .map((value) => {
            const label = typeof value === 'symbol' ? value.toString() : `${value}`;
            return {
                label,
            };
        });
    }
    isValidTokenArray(values) {
        return this.isPrimitiveValuesArray(values) || this.isLabelObjectArray(values);
    }
    isPrimitiveValuesArray(values) {
        return values.filter((value) => value !== Object(value)).length === values.length;
    }
    isLabelObjectArray(values) {
        return values.filter((value) => value?.label !== null && value?.label !== undefined).length === values.length;
    }
    sortColumnsBySequence(columns) {
        return columns.sort((a, b) => (a.sequence ?? 0) - (b.sequence ?? 0));
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TableColumnsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TableColumnsComponent, isStandalone: true, selector: "s-table-columns", inputs: { columns: "columns", rowValue: "rowValue", locale: "locale" }, viewQueries: [{ propertyName: "columnsTemplate", first: true, predicate: ["columnsTemplate"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-template #columnsTemplate>\n    @for (column of formattedColumns; track $index; let i = $index) {\n        <td\n            [ngStyle]=\"column.style\"\n            (click)=\"column.onColumnClick ? column.onColumnClick(rowValue) : null\"\n        >\n            @if (column.type !== 'TOKENS' || !isArray(column.columnValue)) {\n                <div [ngClass]=\"{ 'compact-column': column.compact }\">\n                    @if (column.type !== 'LINK') {\n                        <span\n                            [sTooltip]=\"column.tooltip\"\n                            [escape]=\"false\"\n                        >\n                            <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container>\n                        </span>\n                    }\n\n                    @if (column.type === 'LINK') {\n                        @if (cellsData[i]?.[0]?.isUninformed) {\n                            <span class=\"sds-empty-value\">{{ cellsData[i]?.[0]?.value }}</span>\n                        } @else {\n                            <a\n                                [sTooltip]=\"column.tooltip\"\n                                [escape]=\"false\"\n                                (click)=\"column.onLinkClick ? column.onLinkClick(rowValue) : null\"\n                            >\n                                <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container>\n                            </a>\n                        }\n                    }\n\n                    <ng-template #columnValueTemplate>\n                        @for (cellData of cellsData[i]; track $index) {\n                            @if (cellData.isUninformed) {\n                                <span class=\"sds-empty-value\">{{ cellData.value }}</span>\n                            } @else {\n                                @if (column.badgeConfigs) {\n                                    <s-badge\n                                        [sTooltip]=\"column.tooltip\"\n                                        [color]=\"column.badgeConfigs.color\"\n                                        [text]=\"cellData.value\"\n                                    ></s-badge>\n                                } @else {\n                                    <span\n                                        [ngClass]=\"{\n                                            'column-cell-red': column.color === 'Red',\n                                            'column-cell-orange': column.color === 'Orange',\n                                            'column-cell-yellow': column.color === 'Yellow',\n                                            'column-cell-green': column.color === 'Green',\n                                            'column-cell-blue': column.color === 'Blue',\n                                        }\"\n                                        >{{ cellData.value }}</span\n                                    >\n                                }\n                            }\n\n                            @if (cellData.separator) {\n                                <span>{{ cellData.separator }}</span>\n                            }\n                        }\n\n                        @if (!!column.infoSign) {\n                            <span *sInfoSign=\"column.infoSign\"></span>\n                        }\n                    </ng-template>\n                </div>\n            } @else {\n                <s-token-list\n                    [tokens]=\"getTokensByColumn(column)\"\n                    [hidePointerEvents]=\"true\"\n                ></s-token-list>\n\n                @if (!!column.infoSign) {\n                    <span *sInfoSign=\"column.infoSign\"></span>\n                }\n            }\n        </td>\n    }\n</ng-template>\n\n", styles: [":host{display:none}.compact-column{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;word-break:break-word}.column-cell-red{color:#c13018}.column-cell-orange{color:#f8931f}.column-cell-yellow{color:#fcbf10}.column-cell-green{color:#0c9348}.column-cell-blue{color:#428bca}\n"], dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: TooltipDirective, selector: "[sTooltip]", inputs: ["sTooltip", "tooltipPosition", "showDelay", "displayTime", "tooltipEvent", "escape", "visible", "mobileBehavior", "focusedInputRef", "checkTruncatedText"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BadgeComponent, selector: "s-badge", inputs: ["type", "color", "title", "text", "selectable", "iconClass", "iconPosition", "infoSign", "enableTruncateText"], outputs: ["selected"] }, { kind: "directive", type: InfoSignDirective, selector: "[sInfoSign]", inputs: ["sInfoSign", "sInfoSignDisplayTime", "sInfoSignFocusedInputRef", "sInfoSignUseFocusedInputRef"] }, { kind: "component", type: TokenListComponent, selector: "s-token-list", inputs: ["id", "tokens", "removableTokens", "hidePointerEvents"], outputs: ["tokenSelected", "tokenRemoved"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TableColumnsComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-table-columns', standalone: true, imports: [
                        NgStyle,
                        NgClass,
                        TooltipDirective,
                        NgTemplateOutlet,
                        BadgeComponent,
                        InfoSignDirective,
                        TokenListComponent,
                    ], template: "<ng-template #columnsTemplate>\n    @for (column of formattedColumns; track $index; let i = $index) {\n        <td\n            [ngStyle]=\"column.style\"\n            (click)=\"column.onColumnClick ? column.onColumnClick(rowValue) : null\"\n        >\n            @if (column.type !== 'TOKENS' || !isArray(column.columnValue)) {\n                <div [ngClass]=\"{ 'compact-column': column.compact }\">\n                    @if (column.type !== 'LINK') {\n                        <span\n                            [sTooltip]=\"column.tooltip\"\n                            [escape]=\"false\"\n                        >\n                            <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container>\n                        </span>\n                    }\n\n                    @if (column.type === 'LINK') {\n                        @if (cellsData[i]?.[0]?.isUninformed) {\n                            <span class=\"sds-empty-value\">{{ cellsData[i]?.[0]?.value }}</span>\n                        } @else {\n                            <a\n                                [sTooltip]=\"column.tooltip\"\n                                [escape]=\"false\"\n                                (click)=\"column.onLinkClick ? column.onLinkClick(rowValue) : null\"\n                            >\n                                <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container>\n                            </a>\n                        }\n                    }\n\n                    <ng-template #columnValueTemplate>\n                        @for (cellData of cellsData[i]; track $index) {\n                            @if (cellData.isUninformed) {\n                                <span class=\"sds-empty-value\">{{ cellData.value }}</span>\n                            } @else {\n                                @if (column.badgeConfigs) {\n                                    <s-badge\n                                        [sTooltip]=\"column.tooltip\"\n                                        [color]=\"column.badgeConfigs.color\"\n                                        [text]=\"cellData.value\"\n                                    ></s-badge>\n                                } @else {\n                                    <span\n                                        [ngClass]=\"{\n                                            'column-cell-red': column.color === 'Red',\n                                            'column-cell-orange': column.color === 'Orange',\n                                            'column-cell-yellow': column.color === 'Yellow',\n                                            'column-cell-green': column.color === 'Green',\n                                            'column-cell-blue': column.color === 'Blue',\n                                        }\"\n                                        >{{ cellData.value }}</span\n                                    >\n                                }\n                            }\n\n                            @if (cellData.separator) {\n                                <span>{{ cellData.separator }}</span>\n                            }\n                        }\n\n                        @if (!!column.infoSign) {\n                            <span *sInfoSign=\"column.infoSign\"></span>\n                        }\n                    </ng-template>\n                </div>\n            } @else {\n                <s-token-list\n                    [tokens]=\"getTokensByColumn(column)\"\n                    [hidePointerEvents]=\"true\"\n                ></s-token-list>\n\n                @if (!!column.infoSign) {\n                    <span *sInfoSign=\"column.infoSign\"></span>\n                }\n            }\n        </td>\n    }\n</ng-template>\n\n", styles: [":host{display:none}.compact-column{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;word-break:break-word}.column-cell-red{color:#c13018}.column-cell-orange{color:#f8931f}.column-cell-yellow{color:#fcbf10}.column-cell-green{color:#0c9348}.column-cell-blue{color:#428bca}\n"] }]
        }], ctorParameters: () => [], propDecorators: { columnsTemplate: [{
                type: ViewChild,
                args: ['columnsTemplate', { static: true }]
            }], columns: [{
                type: Input
            }], rowValue: [{
                type: Input
            }], locale: [{
                type: Input
            }] } });

var ExportNumberFormat;
(function (ExportNumberFormat) {
    ExportNumberFormat["Raw"] = "raw";
    ExportNumberFormat["Localized"] = "localized";
})(ExportNumberFormat || (ExportNumberFormat = {}));

class ExportUtils {
    static addClass(element, className) {
        element.nativeElement.className = `${element.nativeElement.className} ${className}`;
    }
    static removeClass(element, className) {
        if (element.nativeElement.className.includes(className)) {
            element.nativeElement.className = element.nativeElement.className.replace(className, '');
        }
    }
    static exportCSV(columns = [], data = [], csvSeparator = ';', documentName = 'download') {
        let csv = '\ufeff';
        columns
            .filter((column) => column.exportable && column.field)
            .forEach((column, i) => {
            csv += `"${column.header || column.field}"`;
            if (i < columns.length - 1)
                csv += csvSeparator;
        });
        data.forEach((record) => {
            csv += '\n';
            columns
                .filter((column) => column.exportable && column.field)
                .forEach((column, i) => {
                let cellData;
                if (Array.isArray(column.field)) {
                    const fieldValues = column.field.map((col) => this._resolveFieldData(record, col, column));
                    cellData = fieldValues
                        .flat()
                        .filter((value) => value !== null && value !== undefined)
                        .join(column.separator);
                }
                else {
                    cellData = this._resolveFieldData(record, column.field, column);
                }
                if (cellData !== null)
                    cellData = String(cellData).replace(/"/g, '""');
                else
                    cellData = '';
                csv += `"${cellData}"`;
                if (i < columns.length - 1)
                    csv += csvSeparator;
            });
        });
        const blob = new Blob([csv], {
            type: 'text/csv;charset=utf-8;',
        });
        if (typeof window.navigator.msSaveOrOpenBlob === 'function') {
            navigator.msSaveOrOpenBlob(blob, documentName + '.csv');
        }
        else {
            const link = document.createElement('a');
            link.style.display = 'none';
            document.body.appendChild(link);
            if (link.download !== undefined) {
                link.setAttribute('href', URL.createObjectURL(blob));
                link.setAttribute('download', documentName + '.csv');
                link.click();
            }
            else {
                csv = 'data:text/csv;charset=utf-8,' + csv;
                window.open(encodeURI(csv));
            }
            document.body.removeChild(link);
        }
    }
    static _resolveFieldData(data, field, column) {
        if (!data && !field) {
            return null;
        }
        const needSplitValues = field.includes('.');
        if (this._isFunction(field)) {
            return field(data);
        }
        else if (!needSplitValues) {
            return data[field];
        }
        else {
            const fields = field.split('.');
            let value = data;
            for (let i = 0, len = fields.length; i < len; ++i) {
                if (value === null || value === undefined) {
                    return null;
                }
                value = value[fields[i]];
            }
            return ExportUtils._extractData(value, column);
        }
    }
    static _isFunction(obj) {
        return !!(obj && obj.constructor && obj.call && obj.apply);
    }
    static _extractData(data, column) {
        const _data = Array.isArray(data) ? data : [data];
        switch (column.type) {
            case EnumColumnFieldType.TOKENS:
                return _data.map((d) => ExportUtils._parseToken(d));
            default:
                return data;
        }
    }
    static _parseToken(data) {
        if (isObject(data)) {
            return data['label'];
        }
        else {
            return data;
        }
    }
}
const isObject = (obj) => obj !== null && typeof obj === 'object';

function isNumericColumnType(type) {
    return type === EnumColumnFieldType.NUMBER || type === EnumColumnFieldType.CURRENCY;
}
function isNumericValue(value) {
    return !new BigNumber(value).isNaN();
}
function resolveColumnNumberFormatOptions(column, rowValue, cellNumberFormatOptions) {
    if (cellNumberFormatOptions) {
        return cellNumberFormatOptions;
    }
    return typeof column.numberFormatOptions === 'function'
        ? column.numberFormatOptions({ rowData: rowValue })
        : column.numberFormatOptions;
}
function resolveColumnScale(column, rowValue, fallback = 0) {
    if (isNullOrUndefined(column.scale)) {
        return fallback;
    }
    return typeof column.scale === 'function' ? column.scale(rowValue) : column.scale;
}

function isRowValueFormatOption(cell) {
    return !isNullOrUndefined(cell) && typeof cell === 'object' && 'value' in cell;
}
function swapDecimalSeparator(value, decimalSeparator) {
    // toFixed() (sem argumento) preserva a precisão total e nunca usa notação exponencial,
    // ao contrário de toString(), que passa a notação científica para valores muito grandes/pequenos.
    return new BigNumber(value).toFixed().replace('.', decimalSeparator);
}
// column.attributes é a fonte preferencial (é o que table-columns.component.ts usa pra formatar
// a mesma coluna na tela), mas colunas configuradas só com `field` (sem `attributes`) também
// precisam ser resolvidas — mesmo fallback que mapCustomExport/mapColumnsTranslations já usam.
function resolveColumnAttributes(column) {
    if (column.attributes?.length) {
        return column.attributes;
    }
    const field = column.field;
    if (isNullOrUndefined(field)) {
        return [];
    }
    return Array.isArray(field) ? field : [field];
}
function mapExportValuesRaw(columns, tableData) {
    const numericColumns = columns.filter((column) => isNumericColumnType(column.type));
    if (!numericColumns.length) {
        return tableData;
    }
    return tableData.map((rowData) => {
        const newRow = { ...rowData };
        for (const column of numericColumns) {
            for (const attribute of resolveColumnAttributes(column)) {
                const cell = newRow[attribute];
                if (isRowValueFormatOption(cell)) {
                    newRow[attribute] = cell.value ?? null;
                }
            }
        }
        return newRow;
    });
}
function mapExportValuesLocalized(columns, tableData, numericService, localeOptions) {
    const numericColumns = columns.filter((column) => isNumericColumnType(column.type));
    if (!numericColumns.length) {
        return tableData;
    }
    return tableData.map((rowData) => {
        const newRow = { ...rowData };
        for (const column of numericColumns) {
            for (const attribute of resolveColumnAttributes(column)) {
                const cell = newRow[attribute];
                if (isNullOrUndefined(cell)) {
                    continue;
                }
                const isRichValue = isRowValueFormatOption(cell);
                const rawValue = isRichValue ? cell.value : cell;
                if (isNullOrUndefined(rawValue)) {
                    // Rich-value com value ausente representa um número "não informado" — desembrulha
                    // pra null em vez de deixar o objeto { value, options } intocado (viraria
                    // "[object Object]" no CSV), igual ao que mapExportValuesRaw já faz.
                    newRow[attribute] = null;
                    continue;
                }
                const cellNumberFormatOptions = isRichValue ? cell.options?.numberFormatOptions : undefined;
                const numberFormatOptions = resolveColumnNumberFormatOptions(column, rowData, cellNumberFormatOptions);
                if (numberFormatOptions) {
                    const valueToFormat = numberFormatOptions.style === 'percent'
                        ? new BigNumber(rawValue).times(100).toNumber()
                        : rawValue;
                    newRow[attribute] = numericService.instant(valueToFormat, {
                        locale: localeOptions?.locale,
                        numberFormatOptions: {
                            ...numberFormatOptions,
                            style: 'decimal',
                            useGrouping: false,
                        },
                    });
                    continue;
                }
                const decimalSeparator = localeOptions?.number.decimalSeparator ?? ',';
                if (isNullOrUndefined(column.scale)) {
                    // Sem scale configurado, não há uma quantidade de casas decimais "correta" a impor:
                    // só troca o separador, preservando a precisão original do dado (evita perda de dados no export).
                    newRow[attribute] = isNumericValue(rawValue)
                        ? swapDecimalSeparator(rawValue, decimalSeparator)
                        : rawValue;
                    continue;
                }
                newRow[attribute] = applyLocalizedMask(rawValue, {
                    decimalSeparator,
                    thousandsSeparator: '',
                    scale: resolveColumnScale(column, rowData),
                    prefix: '',
                    suffix: '',
                    allowNegative: true,
                }, isNumericValue(rawValue));
            }
        }
        return newRow;
    });
}

class TablePagingComponent {
    translate = inject(TranslateService);
    hostProjectConfigs = inject(HostProjectConfigsInjectionToken);
    totalRecords;
    exportFileName;
    table;
    exportable = true;
    enableExportSelectedRecords = true;
    customActions;
    loadAllRecords;
    loadCurrentPageRecords;
    loadSelectedRecords;
    exportNumberFormat = input();
    totalRecordsText = '';
    localeService = inject(LocaleService);
    numericService = inject(NumericService);
    ngOnChanges(changes) {
        if (changes['totalRecords']?.currentValue) {
            this.totalRecordsText = this.translate.instant(`${this.getTranslatePrefix()}total_records`, {
                value: changes['totalRecords'].currentValue,
            });
        }
    }
    getTranslatePrefix() {
        return `${this.hostProjectConfigs.domain}.${this.hostProjectConfigs.service}.`;
    }
    getTooltipText() {
        return this.translate.instant(`${this.getTranslatePrefix()}export_to_csv`);
    }
    getActions() {
        const actions = [
            this.buildScopeAction('exportCurrentPage', `${this.getTranslatePrefix()}export_current_page`, (format) => this.exportCurrentPage(format)),
        ];
        if (this.enableExportSelectedRecords) {
            actions.push(this.buildScopeAction('exportSelected', `${this.getTranslatePrefix()}export_selected_records`, (format) => this.exportSelectedRecords(format)));
        }
        if (this.loadAllRecords) {
            actions.push(this.buildScopeAction('exportAll', `${this.getTranslatePrefix()}export_all_records`, (format) => this.exportAllRecords(format)));
        }
        if (this.customActions?.length) {
            const customMenus = this.customActions.map((p, $index) => ({
                dataKey: `customAction_${$index}`,
                label: p.label,
                command: p.command,
            }));
            actions.push(...customMenus);
        }
        return actions;
    }
    buildScopeAction(dataKey, label, run) {
        const fixedFormat = this.exportNumberFormat();
        if (fixedFormat) {
            return {
                dataKey,
                label: this.translate.instant(label),
                command: () => run(fixedFormat),
            };
        }
        return {
            dataKey,
            label: this.translate.instant(label),
            submenu: [
                {
                    dataKey: `${dataKey}_raw`,
                    label: this.translate.instant('platform.angular_components.export_raw_data'),
                    command: () => run(ExportNumberFormat.Raw),
                },
                {
                    dataKey: `${dataKey}_localized`,
                    label: this.translate.instant('platform.angular_components.export_localized_data'),
                    command: () => run(ExportNumberFormat.Localized),
                },
            ],
        };
    }
    validateComponent() {
        if (!this.table) {
            throw new Error('Table component not defined');
        }
    }
    getColumnsToExport() {
        return [...(this.table.columns ?? [])].map((column) => {
            const exportColumn = {
                ...column,
                header: column.header,
                exportable: true,
                field: column.field,
                separator: column.separator ?? ' - ',
                enumPrefix: column.enumPrefix,
                customExport: column.customExport,
            };
            if (column.exportable === false) {
                exportColumn.exportable = false;
            }
            if (column.attributes && column.attributes.length) {
                if (column.attributes.length === 1) {
                    exportColumn.field = column.attributes[0];
                }
                else {
                    exportColumn.field = column.attributes;
                }
            }
            return exportColumn;
        });
    }
    getCurrentPageRowsToExport(columns, format) {
        let tableData = deepClone(this.table.value);
        if (this.loadCurrentPageRecords) {
            tableData = this.loadCurrentPageRecords();
        }
        tableData = this.mapCustomExport(columns, tableData);
        tableData = this.mapNumberFormat(columns, tableData, format);
        return this.mapColumnsTranslations(columns, tableData);
    }
    getSelectedRowsToExport(columns, format) {
        let tableData = deepClone(this.table.selection);
        if (this.loadSelectedRecords) {
            tableData = this.loadSelectedRecords();
        }
        tableData = this.mapCustomExport(columns, tableData);
        tableData = this.mapNumberFormat(columns, tableData, format);
        return this.mapColumnsTranslations(columns, tableData);
    }
    mapNumberFormat(columns, tableData, format) {
        return format === ExportNumberFormat.Raw
            ? mapExportValuesRaw(columns, tableData)
            : mapExportValuesLocalized(columns, tableData, this.numericService, this.localeService.getLocaleOptions());
    }
    getPropertyValue(obj, path) {
        return path
            .split('.')
            .reduce((result, prop) => (result[prop] === undefined ? undefined : result[prop]), obj);
    }
    setPropertyValue(obj, path, value) {
        this.recursionSetValue(obj, path.split('.'), value);
    }
    recursionSetValue(obj, keysList, value) {
        const key = keysList[0];
        if (keysList.length === 1) {
            obj[key] = value;
            return obj;
        }
        obj[key] = this.recursionSetValue(obj?.[key] || {}, keysList.slice(1), value);
        return obj;
    }
    mapColumnsTranslations(columns, rows) {
        const enumColumns = columns.filter((p) => p.enumPrefix);
        if (!enumColumns.length) {
            return rows;
        }
        return [...rows].map((row) => {
            const newRow = { ...row };
            enumColumns.forEach((column) => {
                const fields = !Array.isArray(column.field) ? [column.field] : column.field;
                fields.forEach((fieldName) => {
                    const columnData = this.getPropertyValue(row, fieldName);
                    if (columnData === null || columnData === undefined) {
                        return;
                    }
                    const newValue = this.translateValue(column, columnData);
                    this.setPropertyValue(newRow, fieldName, newValue);
                });
            });
            return newRow;
        });
    }
    mapCustomExport(columns, rows) {
        const customColumns = columns.filter((p) => p.customExport);
        if (!customColumns.length) {
            return rows;
        }
        return [...rows].map((row) => {
            const newRow = { ...row };
            customColumns.forEach((column) => {
                const fields = !Array.isArray(column.field) ? [column.field] : column.field;
                fields.forEach((fieldName) => {
                    const columnData = this.getPropertyValue(row, fieldName);
                    if (columnData === null || columnData === undefined) {
                        return;
                    }
                    const newValue = column.customExport(columnData);
                    this.setPropertyValue(newRow, fieldName, newValue);
                });
            });
            return newRow;
        });
    }
    translateValue(column, columnData) {
        // Default usage: ENUM_VALUE -> domain.service.enum_value
        const enumValue = columnData.toString().toLowerCase();
        let translationKey = column.enumPrefix + enumValue;
        let translatedValue = this.translate.instant(translationKey);
        // Custom usage 1: V9 -> domain.service.v_9
        if (translationKey === translatedValue && enumValue.length > 1) {
            translationKey = `${column.enumPrefix}${enumValue.substring(0, 1)}_${enumValue.substr(1)}`;
            translatedValue = this.translate.instant(translationKey);
        }
        // Custom usage 2: EnumValue -> domain.service.enum_value
        if (translationKey === translatedValue) {
            const enumKey = this.convertToSnakeCase(columnData.toString());
            translationKey = `${column.enumPrefix}${enumKey}`;
            translatedValue = this.translate.instant(translationKey);
        }
        return translatedValue;
    }
    convertToSnakeCase(str) {
        return str.replace(/([A-Z])/g, (_match, group) => `_${group.toLowerCase()}`).replace(/^_/, '');
    }
    getExportFileName() {
        const lang = this.translate.currentLang ?? 'pt-BR';
        const date = new Date();
        const fileName = this.exportFileName ?? 'download';
        const formattedDate = date.toLocaleDateString(lang).replace('_', '-');
        const formattedTime = date.toLocaleTimeString(lang).replace(' ', '-');
        return `${fileName}_${formattedDate}_${formattedTime}`;
    }
    exportCurrentPage(format = ExportNumberFormat.Localized) {
        this.validateComponent();
        const columns = this.getColumnsToExport();
        const dataToExport = this.getCurrentPageRowsToExport(columns, format);
        ExportUtils.exportCSV(columns, dataToExport, undefined, this.getExportFileName());
    }
    exportSelectedRecords(format = ExportNumberFormat.Localized) {
        this.validateComponent();
        const columns = this.getColumnsToExport();
        const dataToExport = this.getSelectedRowsToExport(columns, format);
        ExportUtils.exportCSV(columns, dataToExport, undefined, this.getExportFileName());
    }
    async exportAllRecords(format = ExportNumberFormat.Localized) {
        this.validateComponent();
        if (!this.loadAllRecords) {
            return;
        }
        let serverData = await this.loadAllRecords();
        const columns = this.getColumnsToExport();
        serverData = this.mapCustomExport(columns, serverData);
        serverData = this.mapNumberFormat(columns, serverData, format);
        const dataToExport = this.mapColumnsTranslations(columns, serverData);
        ExportUtils.exportCSV(columns, dataToExport, undefined, this.getExportFileName());
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TablePagingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TablePagingComponent, isStandalone: true, selector: "s-table-paging", inputs: { totalRecords: { classPropertyName: "totalRecords", publicName: "totalRecords", isSignal: false, isRequired: false, transformFunction: null }, exportFileName: { classPropertyName: "exportFileName", publicName: "exportFileName", isSignal: false, isRequired: false, transformFunction: null }, table: { classPropertyName: "table", publicName: "table", isSignal: false, isRequired: false, transformFunction: null }, exportable: { classPropertyName: "exportable", publicName: "exportable", isSignal: false, isRequired: false, transformFunction: null }, enableExportSelectedRecords: { classPropertyName: "enableExportSelectedRecords", publicName: "enableExportSelectedRecords", isSignal: false, isRequired: false, transformFunction: null }, customActions: { classPropertyName: "customActions", publicName: "customActions", isSignal: false, isRequired: false, transformFunction: null }, loadAllRecords: { classPropertyName: "loadAllRecords", publicName: "loadAllRecords", isSignal: false, isRequired: false, transformFunction: null }, loadCurrentPageRecords: { classPropertyName: "loadCurrentPageRecords", publicName: "loadCurrentPageRecords", isSignal: false, isRequired: false, transformFunction: null }, loadSelectedRecords: { classPropertyName: "loadSelectedRecords", publicName: "loadSelectedRecords", isSignal: false, isRequired: false, transformFunction: null }, exportNumberFormat: { classPropertyName: "exportNumberFormat", publicName: "exportNumberFormat", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"paging-container\">\n    <span class=\"total-records\">\n        {{ totalRecordsText }}\n    </span>\n    @if (exportable) {\n        <s-button\n            class=\"export-button\"\n            priority=\"default\"\n            iconClass=\"fa fa-fw fa-file-export\"\n            [disabled]=\"false\"\n            [auxiliary]=\"true\"\n            [tooltip]=\"getTooltipText()\"\n            [menuOptions]=\"getActions()\"\n        >\n        </s-button>\n    }\n</div>\n", styles: [".paging-container{display:flex;align-items:center}.export-button{margin-left:6px}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel", "ariaLabel"], outputs: ["clicked"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TablePagingComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-table-paging', standalone: true, imports: [ButtonComponent], template: "<div class=\"paging-container\">\n    <span class=\"total-records\">\n        {{ totalRecordsText }}\n    </span>\n    @if (exportable) {\n        <s-button\n            class=\"export-button\"\n            priority=\"default\"\n            iconClass=\"fa fa-fw fa-file-export\"\n            [disabled]=\"false\"\n            [auxiliary]=\"true\"\n            [tooltip]=\"getTooltipText()\"\n            [menuOptions]=\"getActions()\"\n        >\n        </s-button>\n    }\n</div>\n", styles: [".paging-container{display:flex;align-items:center}.export-button{margin-left:6px}\n"] }]
        }], propDecorators: { totalRecords: [{
                type: Input
            }], exportFileName: [{
                type: Input
            }], table: [{
                type: Input
            }], exportable: [{
                type: Input
            }], enableExportSelectedRecords: [{
                type: Input
            }], customActions: [{
                type: Input
            }], loadAllRecords: [{
                type: Input
            }], loadCurrentPageRecords: [{
                type: Input
            }], loadSelectedRecords: [{
                type: Input
            }] } });

class TableModule {
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
    static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: TableModule, imports: [NavigationDirective, RowTogllerDirective, TableColumnsComponent, TablePagingComponent], exports: [RowTogllerDirective, TableColumnsComponent, TablePagingComponent, NavigationDirective] });
    static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TableModule, imports: [TableColumnsComponent, TablePagingComponent] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TableModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [NavigationDirective, RowTogllerDirective, TableColumnsComponent, TablePagingComponent],
                    exports: [RowTogllerDirective, TableColumnsComponent, TablePagingComponent, NavigationDirective],
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { EnumBadgeColors, EnumColumnFieldType, ExportNumberFormat, ExportUtils, NavigationDirective, RowTogllerDirective, TableColumnsComponent, TableModule, TablePagingComponent };
//# sourceMappingURL=seniorsistemas-angular-components-table.mjs.map
