/** Mirrors `config('constants.auction_upload_limits')`. */
export const AUCTION_UPLOAD_LIMITS = {
    plate: 3,
    car: 30,
    car_parts_memorabilia: 10,
} as const;

export type AuctionUploadCategory = keyof typeof AUCTION_UPLOAD_LIMITS;

export function auctionUploadLimit(category: string | null): number {
    if (category === 'car') {
        return AUCTION_UPLOAD_LIMITS.car;
    }

    if (category === 'car_parts_memorabilia') {
        return AUCTION_UPLOAD_LIMITS.car_parts_memorabilia;
    }

    return AUCTION_UPLOAD_LIMITS.plate;
}
