// API Response types
export interface ApiResponse<T = unknown> {
  success: boolean;
  data?: T;
  error?: string;
  message?: string;
  total?: number;
}

// Base entity types
export interface BaseEntity {
  id: string;
  created_at: string;
  updated_at: string;
}

export interface ProviderMapping extends BaseEntity {
  provider: string;
  provider_exchange_code: string;
  provider_exchange_name: string;
  master_exchange_id: string;
  country_code: string | null;
  currency: string | null;
  confidence: number;
  active: boolean;
  verified: boolean;
  auto_mapped: boolean;
  master_exchange_code?: string;
  master_exchange_name?: string;
  master_exchange_active?: boolean;
}

export interface Exchange extends BaseEntity {
  code: string;
  name: string;
  country: string;
  currency: string;
  active: boolean;
  visible: boolean;
  provider_mapping_count: string;
  active_mapping_count: string;
  verified_mapping_count: string;
  providers: string | null;
  provider_mappings: ProviderMapping[];
}

export interface ExchangeDetails {
  exchange: Exchange;
  provider_mappings: ProviderMapping[];
}

export interface ProviderExchange {
  provider_exchange_code: string;
  provider_exchange_name: string;
  country_code: string | null;
  currency: string | null;
  symbol_count: number | null;
}

export interface ExchangeStats {
  total_exchanges: string;
  active_exchanges: string;
  countries: string;
  currencies: string;
  total_provider_mappings: string;
  active_provider_mappings: string;
  verified_provider_mappings: string;
  providers: string;
}
