import { SortDirection } from "./shared/types";
export const sortFunc = {
    vol: (direction)=>(a, b)=>{
            const aValue = a["24h_amount"];
            const bValue = b["24h_amount"];
            return direction === SortDirection.ASC ? aValue - bValue : bValue - aValue;
        },
    price: (direction)=>(a, b)=>{
            return direction === SortDirection.ASC ? a["24h_close"] - b["24h_close"] : b["24h_close"] - a["24h_close"];
        },
    change: (direction)=>(a, b)=>{
            return direction === SortDirection.ASC ? a.change - b.change : b.change - a.change;
        }
};

//# sourceMappingURL=utils.js.map