<?php

namespace virkdata;
require_once WD . '/modules/virkdata/config/virkdata_enabled_c.php';
require_once WD . '/modules/virkdata/config/virkdata_secret_key_c.php';
require_once WD . '/modules/virkdata/config/virkdata_monthly_limit_c.php';
// Require helpers
require_once WD . '/modules/virkdata/helpers/virkdata_request_parameters_country.php';
require_once WD . '/modules/virkdata/helpers/virkdata_request_parameters_format.php';
require_once WD . '/modules/virkdata/helpers/virkdata_response_error_codes.php';
require_once WD . '/modules/virkdata/helpers/virkdata_request_parameters.php';
require_once WD . '/modules/virkdata/helpers/virkdata_response.php';

use virkdata\config\virkdata_monthly_limit_c;
use virkdata\config\virkdata_enabled_c;
use virkdata\config\virkdata_secret_key_c;
use traits\module_config_t;

class virkdata_c
{
    use module_config_t;

    /**
     * The status of the virkdata module
     * @var virkdata_enabled_c
     */
    public virkdata_enabled_c $enabled;
    /**
     * The secret key for the virkdata module (API token)
     * @var virkdata_secret_key_c
     */
    public virkdata_secret_key_c $secret_key;
    /**
     * The monthly limit for the virkdata module
     * @var virkdata_monthly_limit_c
     */
    public virkdata_monthly_limit_c $monthly_limit;

    public function __construct()
    {
        $this->setupConfig('virkdata');
        $this->allowUpdate([
            virkdata_enabled_c::class,
            virkdata_secret_key_c::class,
            virkdata_monthly_limit_c::class
        ]);
        $this->enabled = new virkdata_enabled_c();
        $this->secret_key = new virkdata_secret_key_c();
        $this->monthly_limit = new virkdata_monthly_limit_c();
    }
}