
export enum EngineState {
  IDLE = 'IDLE',
  ANALYZING = 'ANALYZING',
  PLANNING = 'PLANNING',
  EXECUTING = 'EXECUTING',
  SYNTHESIZING = 'SYNTHESIZING',
  COMPLETE = 'COMPLETE',
  ERROR = 'ERROR'
}

export interface LocationParams {
  city?: string;
  country?: string;
  lat?: number;
  lng?: number;
  radius?: string;
}

export interface SearchApi {
  name: string;
  endpoint: string;
  priority: 'HIGH' | 'MEDIUM' | 'LOW';
  params: Record<string, string>;
}

export interface SearchPlan {
  query_analysis: {
    original_query: string;
    intent: 'PRODUCT' | 'SERVICE' | 'INFORMATIONAL' | 'NAVIGATIONAL';
    sentiment: string;
    complexity_score: number;
  };
  location_context: LocationParams;
  target_platforms: string[];
  keywords: string[];
  required_apis: SearchApi[];
  reasoning: string;
}

export interface OmniContextType {
  state: EngineState;
  query: string;
  plan: SearchPlan | null;
  results: any[];
  setQuery: (q: string) => void;
  runAnalysis: () => Promise<void>;
  reset: () => void;
}

// --- Auth & Subscription Types ---

export interface UserProfile {
  id: number | string;
  email: string;
  pesapal_customer_id?: string;
  subscription_status: 'active' | 'past_due' | 'canceled' | 'free';
  plan_tier: 'free' | 'pro' | 'elite';
  is_admin?: boolean;
}

export interface Session {
  user: UserProfile;
  access_token: string;
}