<?php
/**
 * Google Sheets Configuration
 * 
 * Contains OAuth 2.0 credentials for Google Sheets API integration
 * DO NOT commit this file to version control
 */

if (!defined('ABSPATH')) {
    exit;
}

// Google OAuth 2.0 Credentials
define('GOOGLE_SHEETS_CLIENT_ID', '497885324856-0p6f846hlhl5kolsi2pu2trv6ogkqme4.apps.googleusercontent.com');
define('GOOGLE_SHEETS_CLIENT_SECRET', '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');

// OAuth Redirect URI (must match what's configured in Google Console)
// For staging: https://upskill-staging.measurequick.com/google-sheets/
// For production: https://upskillhvac.com/google-sheets/
// Auto-detect based on current site URL
$site_url = function_exists('get_site_url') ? get_site_url() : 'https://upskillhvac.com';
define('GOOGLE_SHEETS_REDIRECT_URI', rtrim($site_url, '/') . '/google-sheets/');

// Refresh Token (obtained after initial OAuth flow)
// Leave empty initially - will be set after first authorization
define('GOOGLE_SHEETS_REFRESH_TOKEN', '');

// Google Drive Folder ID (optional)
// Create a folder in Google Drive and copy the ID from the URL
// Example: https://drive.google.com/drive/folders/1ABCDefGHIjkLMnoPQRstUVwxyz
// The folder ID would be: 1ABCDefGHIjkLMnoPQRstUVwxyz
define('GOOGLE_SHEETS_FOLDER_ID', '');

/*
 * IMPORTANT: To fix the redirect_uri_mismatch error, you need to:
 * 
 * 1. Go to Google Cloud Console: https://console.cloud.google.com/apis/credentials
 * 2. Find your OAuth 2.0 Client ID: 497885324856-0p6f846hlhl5kolsi2pu2trv6ogkqme4.apps.googleusercontent.com
 * 3. Click "Edit" on the client ID
 * 4. In "Authorized redirect URIs", add exactly these URIs:
 *    https://upskill-staging.measurequick.com/google-sheets/ (for staging)
 *    https://upskillhvac.com/google-sheets/ (for production)
 * 6. Save the changes
 * 
 * The redirect URIs must match EXACTLY (including trailing slash).
 */