// AI Providers Configuration
// Centralized configuration for all supported AI providers

const AI_PROVIDERS_CONFIG = {
  local: {
    id: "local",
    name: "Local Built-In AI (FREE & FAST)",
    icon: "🤖",
    description: "Zero-cost, offline, lightning-fast AI processing - Always FREE & Private",
    models: [
      { id: "built-in-patterns", name: "Built-In Patterns", description: "Optimized for mobile automation", default: true }
    ],
    apiKeyLabel: "No API Key Required",
    apiKeyPlaceholder: "Always FREE - No setup required!",
    apiKeyPattern: null,
    docsUrl: "#",
    docsLabel: "Local AI Documentation"
  },

  tensorflow: {
    id: "tensorflow",
    name: "TensorFlow.js AI (Enhanced Patterns)",
    icon: "🧠",
    description: "Enhanced pattern matching with TensorFlow.js - FREE & Improved",
    models: [
      { id: "enhanced-patterns", name: "Enhanced Patterns", description: "TensorFlow.js with enhanced pattern matching", default: true }
    ],
    apiKeyLabel: "No API Key Required",
    apiKeyPlaceholder: "FREE enhanced pattern matching",
    apiKeyPattern: null,
    docsUrl: "#",
    docsLabel: "TensorFlow.js Documentation"
  },
  
  openai: {
    id: "openai",
    name: "OpenAI",
    icon: "🤖",
    description: "GPT-4o and GPT-4 Turbo models",
    models: [
      { id: "gpt-4o", name: "GPT-4o", description: "Fastest GPT-4 level, multimodal", default: true },
      { id: "gpt-4o-mini", name: "GPT-4o Mini", description: "Affordable and fast" }
    ],
    apiKeyLabel: "OpenAI API Key",
    apiKeyPlaceholder: "sk-proj-...",
    apiKeyPattern: /^sk-(proj-)?[A-Za-z0-9]{32,}$/,
    docsUrl: "https://platform.openai.com/api-keys",
    docsLabel: "OpenAI Platform"
  },
  
  gemini: {
    id: "gemini",
    name: "Google Gemini",
    icon: "✨",
    description: "Gemini 2.5 and 1.5 models",
    models: [
      { id: "gemini-2.5-flash", name: "Gemini 2.5 Flash", description: "Fast and reliable", default: true },
      { id: "gemini-2.5-pro", name: "Gemini 2.5 Pro", description: "Most capable" }
    ],
    apiKeyLabel: "Google AI API Key",
    apiKeyPlaceholder: "AIza...",
    apiKeyPattern: /^AIza[0-9A-Za-z-_]{35}$/,
    docsUrl: "https://aistudio.google.com/apikey",
    docsLabel: "Google AI Studio"
  },
  
  claude: {
    id: "claude",
    name: "Anthropic Claude",
    icon: "🤖",
    description: "Claude 3.5 Sonnet and Haiku models",
    models: [
      { id: "claude-3-5-sonnet-20241022", name: "Claude 3.5 Sonnet", description: "Most intelligent", default: true },
      { id: "claude-3-5-haiku-20241022", name: "Claude 3.5 Haiku", description: "Fast and cost-effective" }
    ],
    apiKeyLabel: "Anthropic API Key",
    apiKeyPlaceholder: "sk-ant-...",
    apiKeyPattern: /^sk-ant-[a-zA-Z0-9\-_]{95,}$/,
    docsUrl: "https://console.anthropic.com/settings/keys",
    docsLabel: "Anthropic Console"
  }
};

module.exports = {
  AI_PROVIDERS_CONFIG
};
