const defaultSortNumberFn = (a, b) => {
    if (a === null && b === null) {
        return 0;
    }
    if (a === null) {
        return 1;
    }
    if (b === null) {
        return -1;
    }
    return Number(a) - Number(b);
};
const defaultSortTextFn = (a, b) => {
    if (a === null && b === null) {
        return 0;
    }
    if (a === null) {
        return 1;
    }
    if (b === null) {
        return -1;
    }
    return a.localeCompare(b);
};
export const defaultSortFns = (columnType) => {
    switch (columnType) {
        case 'number':
        case 'amount':
            return defaultSortNumberFn;
        case 'boolean':
        case 'string':
        case 'country':
        case 'enum':
        case 'currency':
        case 'date':
        case 'datetime':
        case 'time':
        case 'url':
        case 'email':
        case 'phid':
        case 'oid':
        case 'aid':
        default:
            return defaultSortTextFn;
    }
};
//# sourceMappingURL=default-sort-fns.js.map