import type { InfluencerProfileList } from './influencer';

export interface BusinessProfile {
  id: number;
  user: number;
  user_name: string;
  user_email: string;
  company_name: string;
  company_website: string | null;
  industry: string;
  company_description: string;
  contact_email: string;
  contact_phone: string;
  country: string;
  city: string;
  typical_budget_min: number | null;
  typical_budget_max: number | null;
  ai_predicted_niche?: string;
  niche_probabilities?: Record<string, number>;
  niche_recommendation_explanation?: string;
  created_at: string;
  updated_at: string;
}

export interface MatchingRequest {
  business_description: string;
  budget_min: number;
  budget_max: number;
  top_k?: number;
  /** Target audience countries (matched to influencer audience breakdown, not company HQ). */
  audience_countries?: string[];
  audience_cities?: string[];
}

export interface InfluencerMatch {
  profile: InfluencerProfileList;
  match_score: number;
  niche_similarity: number;
  budget_fit: number;
  location_match_score?: number;
  price_info?: {
    is_affordable: boolean;
    price_position: string;
  };
}

export interface BusinessRequirements {
  niche_probabilities: Record<string, number>;
  top_niche: string;
}

export interface MatchingResponse {
  matches: InfluencerMatch[];
  business_requirements: BusinessRequirements;
  search_id: number;
}

export interface BusinessSearch {
  id: number;
  business_user_name: string;
  business_description: string;
  budget_min: number;
  budget_max: number;
  top_k: number;
  audience_countries?: string[];
  audience_cities?: string[];
  matches_count: number;
  created_at: string;
}
