import { Passenger } from '@edr/types';

export interface Booking {
  id: string;
  reference: string;
  passengerId: string;
  passenger?: Passenger.IPassenger;
  tripId: string;
  status: 'PENDING' | 'CONFIRMED' | 'CANCELLED' | 'COMPLETED';
  totalAmount: number;
  currency: string;
  paymentStatus: Passenger.PaymentStatus;
  createdAt: string;
  updatedAt: string;
}

export interface Trip {
  id: string;
  trainCode: string;
  routeId: string;
  originStationId: string;
  destinationStationId: string;
  departureTime: string;
  arrivalTime: string;
  status: Passenger.ScheduleStatus;
  basePrice: number;
  availableSeats: number;
  totalSeats: number;
}

export interface DashboardStats {
  totalBookings: number;
  totalRevenue: number;
  totalPassengers: number;
  activeTrips: number;
  bookingsToday: number;
  revenueToday: number;
  occupancyRate: number;
}

export interface RevenueData {
  date: string;
  revenue: number;
  bookings: number;
}

export interface BookingFilters {
  status?: string;
  dateFrom?: string;
  dateTo?: string;
  search?: string;
  page?: number;
  pageSize?: number;
}

export interface PassengerFilters {
  search?: string;
  verified?: boolean;
  role?: string;
  page?: number;
  pageSize?: number;
}

export interface Route {
  id: string;
  name: string;
  originStationId: string;
  destinationStationId: string;
  distance: number;
  duration: number;
  active: boolean;
  createdAt: string;
}

export interface FareRule {
  id: string;
  routeId: string;
  passengerCategory: 'ADULT' | 'CHILD';
  serviceClass: string;
  baseFare: number;
  currency: string;
}

export interface NotificationTemplate {
  id: string;
  name: string;
  channel: 'EMAIL' | 'SMS' | 'PUSH';
  subject?: string;
  body: string;
  active: boolean;
}

export interface AdminUser {
  id: string;
  email: string;
  fullName: string;
  role: 'ADMIN' | 'AGENT' | 'SUPERVISOR';
  active: boolean;
}

// Re-export EDR types
export * from './edr';
