"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GlobalFaceting = void 0;
//
exports.GlobalFaceting = {
    createTable: (table) => {
        table._getGlobalFacetedRowModel =
            table.options.getFacetedRowModel && table.options.getFacetedRowModel(table, '__global__');
        table.getGlobalFacetedRowModel = () => {
            if (table.options.manualFiltering || !table._getGlobalFacetedRowModel) {
                return table.getPreFilteredRowModel();
            }
            return table._getGlobalFacetedRowModel();
        };
        table._getGlobalFacetedUniqueValues =
            table.options.getFacetedUniqueValues &&
                table.options.getFacetedUniqueValues(table, '__global__');
        table.getGlobalFacetedUniqueValues = () => {
            if (!table._getGlobalFacetedUniqueValues) {
                return new Map();
            }
            return table._getGlobalFacetedUniqueValues();
        };
        table._getGlobalFacetedMinMaxValues =
            table.options.getFacetedMinMaxValues &&
                table.options.getFacetedMinMaxValues(table, '__global__');
        table.getGlobalFacetedMinMaxValues = () => {
            if (!table._getGlobalFacetedMinMaxValues) {
                return;
            }
            return table._getGlobalFacetedMinMaxValues();
        };
    },
};
