import { Order } from "./types";
// Export all types from types.ts
export * from "./types";
export function getRange(range) {
    switch (range) {
        case "day":
        case "24h":
            return "1d";
        case "7d":
        case "week":
            return "1w";
        case "30d":
        case "month":
            return "1m";
        case "1y":
        case "year":
        case "all":
            return "1y";
    }
}
export const getSortParam = (order, range) => {
    switch (order) {
        default:
        case Order.MarketCapDesc:
            return "market-cap-rank";
        case Order.MarketCapAsc:
            return "market-cap-rank-desc";
        case Order.topLosers:
            return `negative-price-change-${getRange(range)}`;
        case Order.topGainers:
            return `positive-price-change-${getRange(range)}`;
    }
};
//# sourceMappingURL=index.js.map