<?php

declare(strict_types=1);

use App\Core\Env;

return [
    'name'    => Env::get('APP_NAME', 'A&B Hub'),
    'env'     => Env::get('APP_ENV', 'production'),
    'debug'   => (bool) Env::get('APP_DEBUG', false),
    'url'     => rtrim((string) Env::get('APP_URL', 'http://localhost'), '/'),

    // Wildcard base domain tenants live under, e.g. 'yoursaas.com' so a
    // tenant with slug 'acme' is reached at https://acme.yoursaas.com.
    // Requires a wildcard DNS record (*.yoursaas.com) and a wildcard
    // vhost — see deploy/apache-vhost.conf.
    'domain'  => Env::get('APP_DOMAIN', ''),

    // Where TenantMiddleware sends visitors on the root domain / an
    // unrecognized subdomain: the public marketing + signup site.
    'marketing_url' => rtrim((string) Env::get('APP_MARKETING_URL', Env::get('APP_URL', 'http://localhost')), '/'),
    'timezone' => Env::get('APP_TIMEZONE', 'America/Toronto'),
    'locale'  => Env::get('APP_LOCALE', 'en'),
    'key'     => Env::get('APP_KEY', ''),
    'default_currency' => Env::get('APP_DEFAULT_CURRENCY', 'CAD'),

    // Base path of the app on disk, used by services that need to
    // resolve storage/uploads paths regardless of the working directory.
    'base_path' => dirname(__DIR__),
];
