<?php

namespace workfeed;

require_once WD . '/modules/workfeed/config/workfeed_enabled_c.php';
require_once WD . '/modules/workfeed/config/workfeed_api_url_c.php';
require_once WD . '/modules/workfeed/config/workfeed_api_key_c.php';
require_once WD . '/modules/workfeed/config/workfeed_company_id_c.php';

use traits\module_config_t;
use workfeed\config\workfeed_api_key_c;
use workfeed\config\workfeed_api_url_c;
use workfeed\config\workfeed_company_id_c;
use workfeed\config\workfeed_enabled_c;

class workfeed_c
{
    use module_config_t;

    public workfeed_enabled_c $enabled;
    public workfeed_api_url_c $api_url;
    public workfeed_api_key_c $api_key;
    public workfeed_company_id_c $company_id;

    public function __construct()
    {
        $this->setupConfig('workfeed');
        $this->allowUpdate([
            workfeed_enabled_c::class,
            workfeed_api_url_c::class,
            workfeed_api_key_c::class,
            workfeed_company_id_c::class,
        ]);

        $this->enabled = new workfeed_enabled_c();
        $this->api_url = new workfeed_api_url_c();
        $this->api_key = new workfeed_api_key_c();
        $this->company_id = new workfeed_company_id_c();
    }
}
