import type { Product } from './cart';
import type { User } from './user';

export interface InitialData {
    existing?: number;
    available_groups: string[];
    initial_groups: string[];
    days: number;
    fullness: number;
    users: User[];
    cart: Product[][];
    excess?: number;
    precision?: number;
}

export type CartUpdateStatus = 'clear' | 'data' | 'waiting' | 'complete';

export interface CartUpdateResponse {
    status: CartUpdateStatus;
    error_message?: string;
    payload?: {
        excess?: number;
        precision?: number;
        chunk?: Product[];
        unique_sku_cnt?: number;
    };
}