export type VerificationStatus = boolean;
export type DataProcessingStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';

export interface InfluencerProfile {
  id: number;
  user: {
    id: number;
    username: string;
    email: string;
    first_name: string;
    last_name: string;
    role: string;
  };
  instagram_handle: string;
  instagram_business_id: string | null;
  followers_count: number;
  media_count: number;

  ave_impressions: number;
  ave_reach: number;
  ave_engagement: number;
  ave_saves: number;
  ave_video_views: number;
  engagement_rate_percent: number;

  follower_growth: number;
  follower_growth_rate_percent: number;
  profile_views: number;

  female_audience_percentage: number;
  male_audience_percentage: number;
  audience_summary_string: string;
  audience_age_distribution: Record<string, number>;
  audience_gender_distribution: Record<string, number>;
  audience_top_countries: { name: string; percentage: number }[];
  audience_top_cities: { name: string; percentage: number }[];

  ai_predicted_niche: string;
  niche_probabilities: Record<string, number>;

  niche_classification_explanation: string | null;
  authenticity_score: string | null;
  bot_detection_flags: string[];

  estimated_price_min: number | null;
  estimated_price_max: number | null;
  estimated_price_avg: number | null;

  verification_status: VerificationStatus;
  is_verified: boolean;
  data_is_fresh: boolean;
  data_processing_status: DataProcessingStatus;
  error_message: string | null;

  last_data_fetch: string | null;
  created_at: string;
  updated_at: string;
}

export interface InfluencerProfileList {
  id: number;
  display_name: string;
  followers_count: number;
  engagement_rate_percent: number;
  ai_predicted_niche: string;
  niche_classification_explanation: string | null;
  authenticity_score: string | null;
  estimated_price_min: number | null;
  estimated_price_max: number | null;
  estimated_price_avg: number | null;
  female_audience_percentage: number;
  male_audience_percentage: number;
  audience_summary_string: string;
  audience_age_distribution: Record<string, number>;
  audience_top_countries: { name: string; percentage: number }[];
  audience_top_cities: { name: string; percentage: number }[];
  ave_impressions: number;
  ave_reach: number;
  ave_engagement: number;
  ave_saves: number;
  media_count: number;
  verification_status: VerificationStatus;
}

export interface MediaPost {
  id: number;
  media_id: string;
  media_type: 'IMAGE' | 'VIDEO' | 'CAROUSEL_ALBUM';
  caption: string;
  timestamp: string;
  impressions: number;
  reach: number;
  engagement: number;
  saved: number;
  video_views: number | null;
  engagement_rate: number;
  fetched_at: string;
}

export interface InstagramConnectResponse {
  oauth_url: string;
}
