<?php
/**
 * EdumacFlo SaaS Master Control Plane Configuration
 * -------------------------------------------------
 * Rename this file to `saas_master_config.php` to enable multi-tenant dynamic routing.
 *
 * When enabled, the application will inspect the incoming HTTP domain/subdomain
 * (e.g. `school1.edumacflo.com` or `portal.school.edu`), look up the school in `edumacflo_master`,
 * and dynamically connect to that school's isolated database.
 *
 * If this file is missing or 'enabled' is set to false, EdumacFlo runs in standard single-tenant mode.
 */

return [
    'enabled'  => true,
    'host'     => 'localhost',
    'username' => 'root',
    'password' => '',
    'dbname'   => 'edumacflo_master',
    
    // Cache configuration: caches tenant lookups to prevent querying the master DB on every page request
    'cache_ttl_seconds' => 300, // 5 minutes
    'cache_dir'         => __DIR__ . '/public/cache/tenants/',
    
    // Fallback tenant slug for localhost development if no subdomain is present
    'default_tenant_slug' => 'default',

    // Payment Gateway & Billing Configuration
    'currency'           => 'NGN',
    'payment_simulation' => true, // Set to false in production to use live Paystack/Flutterwave

    // Paystack Configuration
    'paystack' => [
        'public_key' => 'pk_test_sample_public_key',
        'secret_key' => 'sk_test_sample_secret_key',
    ],

    // Flutterwave Configuration
    'flutterwave' => [
        'public_key' => 'FLWPUBK_TEST-sample_public_key',
        'secret_key' => 'FLWSECK_TEST-sample_secret_key',
    ],

    // Offline Wire / Bank Transfer Instructions for Schools
    'bank_transfer' => [
        'bank_name'      => 'Zenith Bank PLC',
        'account_name'   => 'EdumacFlo Technologies Ltd',
        'account_number' => '1012345678',
        'instructions'   => 'Please use your school slug or domain as payment narration.',
    ],
];
