<?php

namespace xlvask;
require_once WD . '/modules/xlvask/config/xlvask_enabled_c.php';
require_once WD . '/modules/xlvask/config/xlvask_synchronization_enabled_c.php';
require_once WD . '/modules/xlvask/config/xlvask_username_c.php';
require_once WD . '/modules/xlvask/config/xlvask_password_c.php';

use traits\module_config_t;
use xlvask\config\xlvask_enabled_c;
use xlvask\config\xlvask_password_c;
use xlvask\config\xlvask_synchronization_enabled_c;
use xlvask\config\xlvask_username_c;

class xlvask_c
{
    use module_config_t;

    /**
     * The API URL for the xlvask module
     * @var string $api_url
     */
    public string $api_url = 'https://api.xlwash.com';
    /**
     * The status of the module
     * @var xlvask_enabled_c
     */
    public xlvask_enabled_c $enabled;
    /**
     * The synchronization status of the module
     * @var xlvask_synchronization_enabled_c $synchronization_enabled
     */
    public xlvask_synchronization_enabled_c $synchronization_enabled;
    /**
     * The username
     * @var xlvask_username_c
     */
    public xlvask_username_c $username;
    /**
     * The password
     * @var xlvask_password_c
     */
    public xlvask_password_c $password;
    /**
     * The vendor ID for the xlvask module (GUID)
     * @var string $vendor_id
     */
    public string $vendor_id = 'c92a88b5-7aae-4d41-b284-f91b9b341c46';

    public function __construct()
    {
        $this->setupConfig('xlvask');
        $this->allowUpdate([
            xlvask_enabled_c::class,
            xlvask_synchronization_enabled_c::class,
            xlvask_username_c::class,
            xlvask_password_c::class
        ]);
        $this->enabled = new xlvask_enabled_c();
        $this->synchronization_enabled = new xlvask_synchronization_enabled_c();
        $this->username = new xlvask_username_c();
        $this->password = new xlvask_password_c();
    }
}