import { Observable } from 'rxjs';
import { CheckoutSession, ServerCart, ServerCartLine } from '../models/server-cart.model';

/** Per docs/backend/PHASE-6-CART-CHECKOUT-CONTRACT.md §3, §5. */
export interface ServerCartGateway {
  getCart(): Observable<{ cart: ServerCart; lines: ServerCartLine[] }>;
  addLine(offerId: string, qty: number): Observable<ServerCartLine>;
  updateLine(lineId: string, qty: number): Observable<ServerCartLine>;
  removeLine(lineId: string): Observable<void>;
  startCheckout(deliveryOptionId: string, currency: string): Observable<CheckoutSession>;
}
