import { _products } from "src/_mock";

export type Product = {
    id: string;
    name: string;
    price?: number;
    status?: string;
    version?: string;
    coverUrl?: string;
    colors?: string[];
    priceSale?: number;
    url?: string;
};

/**
 * send a request to the server to get the products
 * @returns Array of products
 */
export function getProductsAsync(): Promise<Product[]> {
    //TODO: Implement the API call using fetch or axios
    return Promise.resolve(_products);
}