import {descendingComparator} from "./descendingComparator";

export function getComparator(order, orderBy, lastOrder) {
    if(!order) {
        order = "asc"
    }
    return order === 'desc'
        ? (a, b) => descendingComparator(a, b, orderBy, lastOrder)
        : (a, b) => -descendingComparator(a, b, orderBy, lastOrder);
}