export interface AuthUser {
  id?: string;
  _id?: string;
  name?: string;
  first_name?: string;
  last_name?: string;
  email?: string;
  phone?: string;
  country_code?: string;
  avatar?: string;
  profile_picture?: string;
  role?: string;
  is_email_verify?: boolean;
  is_phone_verify?: boolean;
  access_token?: string;
  created_at?: string;
  updated_at?: string;
}

export interface LoginPayload {
  country_code: string;
  phone: string;
  type?: 'customer' | 'driver' | 'vendor';
  fcm_token?: string;
  system_type?: string;
}

export interface VerifyOtpPayload {
  country_code: string;
  phone: string;
  otp: string;
  token?: string;
  fcm_token?: string;
}

export interface AuthResponse {
  statusCode?: number;
  message?: string;
  token?: string;
  access_token?: string;
  data?: AuthUser;
}

export type MFEEventType =
  | 'MFE_AUTH_UNAUTHORIZED'
  | 'MFE_LOGOUT'
  | 'MFE_NAVIGATE'
  | 'MFE_CART_UPDATED'
  | 'MFE_RIDE_UPDATED';

export interface MFEEvent<T = any> {
  type: MFEEventType;
  payload?: T;
}

export interface ServiceItem {
  id: 'food' | 'cab';
  title: string;
  subtitle: string;
  description: string;
  icon: string;
  badge?: string;
  href: string;
  available: boolean;
}
