/**
 * Social Engine — Shared Types
 */

export interface PersonaConfig {
  id: number;
  slug: string;
  display_name: string;
  voice_style: string;
  emoji_prefix: string;
  target_audience: string;
  content_types: string[];
  weight: number;
  is_active: boolean;
}

export interface TrendSignal {
  id: string;
  trend_type: string;
  signal_source: string;
  sport: string | null;
  league: string | null;
  title: string;
  data: Record<string, any>;
  heat_score: number;
  expires_at: Date;
}

export interface PersonaTrendPair {
  trend: TrendSignal;
  persona: PersonaConfig;
}

export interface SocialContentPiece {
  id?: string;
  persona_id: number;
  trend_id: string;
  content_type: string;
  format: string;
  text: string;
  image_prompt?: string;
  image_url?: string;
  league?: string;
  sport?: string;
  game_key?: string;
  forecast_id?: string;
  source_data?: Record<string, any>;
  quality_score?: number;
  compliance_ok?: boolean;
  status?: string;
  parent_content_id?: string;
  thread_position?: number;
}

export interface GrokPersonaResponse {
  text: string;
  imagePrompt?: string;
  threadIdeas?: string[];
  pickSide?: string;
}

export interface EngineRunRecord {
  id?: number;
  run_type: string;
  trends_found: number;
  content_created: number;
  content_posted: number;
  duration_ms: number;
  status: string;
  error_message?: string;
}
