<?php

namespace entra;
require_once WD . '/modules/entra/config/entra_enabled_c.php';
require_once WD . '/modules/entra/config/entra_client_id_c.php';
require_once WD . '/modules/entra/config/entra_client_secret_c.php';
require_once WD . '/modules/entra/config/entra_tenant_id_c.php';


use entra\config\entra_client_id_c;
use entra\config\entra_client_secret_c;
use entra\config\entra_enabled_c;
use entra\config\entra_tenant_id_c;
use traits\module_config_t;

class entra_c
{
    use module_config_t;

    /**
     * The status of entra, whether it is enabled or not
     * @var entra_enabled_c
     */
    public entra_enabled_c $enabled;
    /**
     * The client id for entra
     * @var entra_client_id_c
     */
    public entra_client_id_c $client_id;
    /**
     * The secret key for entra
     * @var entra_client_secret_c
     */
    public entra_client_secret_c $client_secret;
    /**
     * The tenant id for entra
     * @var entra_tenant_id_c
     */
    public entra_tenant_id_c $tenant_id;

    public function __construct()
    {
        $this->setupConfig('Entra');
        $this->allowUpdate([
            entra_enabled_c::class,
            entra_client_id_c::class,
            entra_client_secret_c::class,
            entra_tenant_id_c::class,
        ]);
        $this->enabled = new entra_enabled_c();
        $this->client_id = new entra_client_id_c();
        $this->client_secret = new entra_client_secret_c();
        $this->tenant_id = new entra_tenant_id_c();
    }
}