<?php
/**
 * SEO Analytics Configuration
 * Secure storage for API keys and settings
 * Load from environment variables in production
 */

return [
    // Google Search Console API
    'google_search_console' => [
        'enabled' => getenv('GSC_ENABLED') ?: false,
        'client_id' => getenv('GSC_CLIENT_ID') ?: '',
        'client_secret' => getenv('GSC_CLIENT_SECRET') ?: '',
        'refresh_token' => getenv('GSC_REFRESH_TOKEN') ?: '',
        'property_url' => getenv('GSC_PROPERTY_URL') ?: '',
    ],

    // Google Analytics 4 API
    'google_analytics' => [
        'enabled' => getenv('GA4_ENABLED') ?: false,
        'client_id' => getenv('GA4_CLIENT_ID') ?: '',
        'client_secret' => getenv('GA4_CLIENT_SECRET') ?: '',
        'refresh_token' => getenv('GA4_REFRESH_TOKEN') ?: '',
        'property_id' => getenv('GA4_PROPERTY_ID') ?: '',
    ],

    // Bing Webmaster Tools API
    'bing_webmaster' => [
        'enabled' => getenv('BING_ENABLED') ?: false,
        'api_key' => getenv('BING_API_KEY') ?: '',
        'site_url' => getenv('BING_SITE_URL') ?: '',
    ],

    // SEMrush API
    'semrush' => [
        'enabled' => getenv('SEMRUSH_ENABLED') ?: false,
        'api_key' => getenv('SEMRUSH_API_KEY') ?: '',
    ],

    // Ahrefs API
    'ahrefs' => [
        'enabled' => getenv('AHREFS_ENABLED') ?: false,
        'api_key' => getenv('AHREFS_API_KEY') ?: '',
    ],

    // General Settings
    'general' => [
        'cache_ttl' => 3600, // 1 hour
        'rate_limit' => 100, // requests per hour
        'log_requests' => true,
        'debug_mode' => getenv('DEBUG_MODE') ?: false,
    ],

    // Database
    'database' => [
        'table_prefix' => 'seo_analytics_',
    ],

    // Chart Settings
    'charts' => [
        'library' => 'apexcharts', // apexcharts or chart.js
        'theme' => 'light',
        'colors' => ['#00D9FF', '#FFB700', '#FF6B6B', '#4ECDC4', '#45B7D1'],
    ],

    // Admin Settings
    'admin' => [
        'require_auth' => true,
        'session_timeout' => 3600,
        'max_export_rows' => 10000,
    ],
];
?>
