/**
 * Cart domain entities
 */

export interface Cart {
  id: string;
  userId: string;
  items: CartItem[];
  totals: CartTotals;
  createdAt: string;
  updatedAt: string;
  expiresAt?: string;
}

export interface CartItem {
  id: string;
  productId: string;
  productName: string;
  productImage: string;
  price: number;
  quantity: number;
  subtotal: number;
  options?: CartItemOption[];
}

export interface CartItemOption {
  name: string;
  value: string;
  price?: number;
}

export interface CartTotals {
  subtotal: number;
  tax: number;
  shipping: number;
  discount: number;
  total: number;
  currency: 'USD' | 'EUR' | 'GBP';
}

export interface AddToCartData {
  productId: string;
  quantity: number;
  options?: CartItemOption[];
}

export interface UpdateCartItemData {
  quantity: number;
  options?: CartItemOption[];
}

export interface CartSummary {
  itemCount: number;
  totalAmount: number;
  currency: 'USD' | 'EUR' | 'GBP';
}

export interface ApplyCouponData {
  code: string;
}

export interface CouponDiscount {
  code: string;
  type: 'percentage' | 'fixed';
  value: number;
  description: string;
  maxDiscount?: number;
} 