<?php

namespace reCAPTCHA;
require_once WD . '/modules/reCAPTCHA/config/reCAPTCHA_enabled_c.php';
require_once WD . '/modules/reCAPTCHA/config/reCAPTCHA_secret_key_v2_c.php';
require_once WD . '/modules/reCAPTCHA/config/reCAPTCHA_site_key_v2_c.php';

use reCAPTCHA\config\reCAPTCHA_enabled_c;
use reCAPTCHA\config\reCAPTCHA_secret_key_v2_c;
use reCAPTCHA\config\reCAPTCHA_site_key_v2_c;
use traits\module_config_t;

class reCAPTCHA_c
{
    use module_config_t;

    /**
     * The status of reCAPTCHA, whether it is enabled or not
     * @var reCAPTCHA_enabled_c
     */
    public reCAPTCHA_enabled_c $enabled;
    /**
     * The site key for reCAPTCHA v2
     * @var reCAPTCHA_site_key_v2_c
     */
    public reCAPTCHA_site_key_v2_c $site_key_v2;
    /**
     * The secret key for reCAPTCHA v2
     * @var reCAPTCHA_secret_key_v2_c
     */
    public reCAPTCHA_secret_key_v2_c $secret_key_v2;

    public function __construct()
    {
        $this->setupConfig('reCAPTCHA');
        $this->allowUpdate([
            reCAPTCHA_enabled_c::class,
            reCAPTCHA_secret_key_v2_c::class,
            reCAPTCHA_site_key_v2_c::class
        ]);
        $this->enabled = new reCAPTCHA_enabled_c();
        $this->secret_key_v2 = new reCAPTCHA_secret_key_v2_c();
        $this->site_key_v2 = new reCAPTCHA_site_key_v2_c();
    }
}