import { ReactNode } from "react";

export interface IGetGlobalResponse {
    active_cryptocurrencies: number;
    markets: number;
}

export interface IGetCoinsListRequest {
    page: number;
    per_page: number;
}

export interface IGetCoinsListResponse {
    [key: string]: any;
}

export interface IGetCoinsCountResponse {
    count: number;
}

export interface IGetCoinInfoResponse {
    name: string;
    id: string;
    image: {
        large: string;
    };
    description: {
        en: string;
    }
    market_data: {
        low_24h: { usd: number };
        high_24h: { usd: number };
        ath: { usd: number };
        atl: { usd: number };
        price_change_percentage_24h: number;
        price_change_percentage_7d: number;
        price_change_percentage_14d: number;
        price_change_percentage_30d: number;
        price_change_percentage_60d: number;
        price_change_percentage_200d: number;
        price_change_percentage_1y: number;
    }
}

export interface IGetCoinInfoData {
    data: IGetCoinInfoResponse
}

export interface IGetCoinInfoRequest {
    id: string;
}

export interface IChartDataItem {
    [index: number]: number,
}

export interface IGetCoinChartRequest {
    coin: string;
    days: string;
}

export interface IGetCoinChartResponse {
    market_caps: Array<IChartDataItem>;
    prices: Array<IChartDataItem>;
    total_volumes: Array<IChartDataItem>;
}
