<?php

namespace fxratesapi;
require_once WD . '/modules/fxratesapi/config/fxratesapi_enabled_c.php';
require_once WD . '/modules/fxratesapi/config/fxratesapi_secret_key_c.php';
require_once WD . '/modules/fxratesapi/config/fxratesapi_daily_limit_c.php';

use fxratesapi\config\fxratesapi_daily_limit_c;
use fxratesapi\config\fxratesapi_enabled_c;
use fxratesapi\config\fxratesapi_secret_key_c;
use traits\module_config_t;

class fxratesapi_c
{
    use module_config_t;

    /**
     * The status of the fxratesapi module
     * @var fxratesapi_enabled_c
     */
    public fxratesapi_enabled_c $enabled;
    /**
     * The secret key for the fxratesapi module (API token)
     * @var fxratesapi_secret_key_c
     */
    public fxratesapi_secret_key_c $secret_key;
    /**
     * The daily limit for the fxratesapi module
     * @var fxratesapi_daily_limit_c
     */
    public fxratesapi_daily_limit_c $daily_limit;

    public function __construct()
    {
        $this->setupConfig('fxratesapi');
        $this->allowUpdate([
            fxratesapi_enabled_c::class,
            fxratesapi_secret_key_c::class,
            fxratesapi_daily_limit_c::class
        ]);
        $this->enabled = new fxratesapi_enabled_c();
        $this->secret_key = new fxratesapi_secret_key_c();
        $this->daily_limit = new fxratesapi_daily_limit_c();
    }
}