<?php
require_once __DIR__ . '/../vendor/autoload.php';

$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../');
$dotenv->load();

$host = $_ENV['DB_HOST'];
$dbname = $_ENV['DB_NAME'];
$username = $_ENV['DB_USER'];
$password = $_ENV['DB_PASS'];

$host_crm = $_ENV['DB_HOST_CRM'];
$dbname_crm = $_ENV['DB_NAME_CRM'];
$username_crm = $_ENV['DB_USER_CRM'];
$password_crm = $_ENV['DB_PASS_CRM'];

$host_tesoreria = $_ENV['DB_HOST_TESORERIA'];
$dbname_tesoreria = $_ENV['DB_NAME_TESORERIA'];
$username_tesoreria = $_ENV['DB_USER_TESORERIA'];
$password_tesoreria = $_ENV['DB_PASS_TESORERIA'];


return [
    'database' => [
        'host' => $host,
        'dbname' => $dbname,
        'username' => $username,
        'password' => $password,
    ],
    'database_crm' => [
        'host_crm' => $host_crm,
        'dbname_crm' => $dbname_crm,
        'username_crm' => $username_crm,
        'password_crm' => $password_crm,
    ],
    'database_tesoreria' => [
        'host_tesoreria' => $host_tesoreria,
        'dbname_tesoreria' => $dbname_tesoreria,
        'username_tesoreria' => $username_tesoreria,
        'password_tesoreria' => $password_tesoreria,
    ]
];
