import { getAllDateFieldTypes } from '../services/utilities.js';
import { booleanSortComparer } from './booleanSortComparer.js';
import { getAssociatedDateSortComparer } from './dateUtilities.js';
import { numericSortComparer } from './numericSortComparer.js';
import { objectStringSortComparer } from './objectStringSortComparer.js';
import { stringSortComparer } from './stringSortComparer.js';
// export the Sort Utilities so they could be used by others
export * from './sortUtilities.js';
/**
 * Builds a map of all available SortComparers, including date comparers.
 * @returns {ISortComparers} All sort comparers, keyed by type.
 */
function buildAllSortComparers() {
    const comparers = {
        boolean: booleanSortComparer,
        numeric: numericSortComparer,
        objectString: objectStringSortComparer,
        string: stringSortComparer,
    };
    // Dynamically add date comparers based on available FieldTypes, doing it this way to keep smaller bundle size
    getAllDateFieldTypes().forEach((dateType) => {
        comparers[dateType] = getAssociatedDateSortComparer(dateType);
    });
    return comparers;
}
/**
 * All available SortComparers, including static and dynamically added date comparers.
 *
 * - Static: boolean, numeric, objectString, string
 * - Dynamic: all date field types (see {@link getAllDateFieldTypes})
 */
export const SortComparers = buildAllSortComparers();
//# sourceMappingURL=sortComparers.index.js.map