<?php
/**
 * Copy this file to firebase-admin-bootstrap.local.php on the server (gitignored).
 * Lets api/steadfast-create-order-proxy.php read Steadfast keys from Firebase RTDB
 * at clients/{clientId}/siteSettings/steadfastConfig after verifying the admin idToken.
 *
 * --- cPanel / hosting checklist ---
 * 1) Upload: api/firebase-rtdb-admin.php, api/steadfast-create-order-proxy.php (already in project).
 * 2) Firebase Console → Project settings → Service accounts → Generate new private key
 *    → save as api/firebase-service-account.local.json (chmod 600; never commit).
 *    If this JSON or its private key was ever exposed (chat, screenshot, public repo): delete that key
 *    in Google Cloud Console → IAM → Service Accounts → Keys, then generate a new JSON and replace the file.
 * 3) Copy this file to api/firebase-admin-bootstrap.local.php and set:
 *    - service_account_json_path (absolute path ok)
 *    - firebase_database_url (your Realtime Database URL — must match client firebase-config.js)
 *    - firebase_web_api_key (Web API key from Project settings → General; must match client app)
 *    Replace firebase-service-account.local.json with a new key from the same Firebase project.
 * 4) Ensure PHP has openssl + curl enabled.
 *
 * Also used by shop-entry.php (SSR): first HTML response can embed window.__INITIAL_STATE__
 * for faster storefront first paint when shop-classic.html / shop-default.html are rewritten to shop-entry.php.
 *
 * --- Manual test (Send to Courier) ---
 * 1) Dashboard → save Steadfast API Key + Secret (stored in RTDB path above).
 * 2) Sign in with a Firebase user listed under clients/{clientId}/admins/{uid}.
 * 3) No api/steadfast-config.local.php (or remove it) to force RTDB path.
 * 4) Send order from order detail; expect success or clear error from proxy.
 */
return [
    'service_account_json_path' => __DIR__ . '/firebase-service-account.local.json',
    'firebase_database_url' => 'https://arafstore-14938-default-rtdb.firebaseio.com',
    'firebase_web_api_key' => 'AIzaSyCqfdaLceRPWxi7PQ6QJyrqbSLudoMUywI',
    // Optional — Firebase usage API (api/firebase-usage-metrics.php)
    // 'gcp_monitoring_project_id' => 'your-gcp-project-id', // default: project_id inside service account JSON
    // 'firebase_rtdb_table_name' => 'default-rtdb',       // default: parsed from firebase_database_url host
    // 'gcp_storage_bucket_name' => 'your-app.appspot.com', // Cloud Storage bucket id for total_bytes card
    // 'firebase_storage_bucket' => 'your-app.firebasestorage.app', // alias for gcp_storage_bucket_name
];
