// Shared types for the booking flow.

export interface AttendeeInfo {
  firstName: string;
  lastName: string;
}

export type PaymentMethod = 'bancard' | 'lightning' | 'cash' | 'bank_transfer' | 'tpago';

export interface BookingFormData {
  firstName: string;
  lastName: string;
  email: string;
  phone: string;
  // Empty until the user explicitly picks a method (no default selection).
  paymentMethod: PaymentMethod | '';
  ruc: string;
}

export interface LightningInvoice {
  paymentHash: string;
  paymentRequest: string; // BOLT11 invoice
  amount: number; // Amount in satoshis
  fiatAmount?: number; // Original fiat amount
  fiatCurrency?: string; // Original fiat currency
  expiry?: string;
}

export interface BookingResult {
  ticketId: string;
  ticketIds?: string[]; // For multi-ticket bookings
  bookingId?: string;
  qrCode: string;
  qrCodes?: string[]; // For multi-ticket bookings
  paymentMethod: PaymentMethod;
  lightningInvoice?: LightningInvoice;
  ticketCount?: number;
}

export type BookingStep = 'form' | 'paying' | 'manual_payment' | 'pending_approval' | 'success';
