<?php

namespace modules\edgegateway\config;

use Exception;
use traits\module_config_variable;

class edgegateway_public_broker_url_c
{
    use module_config_variable;

    /**
     * @throws Exception
     */
    public function __construct()
    {
        $this->setupConfigVariable(
            'edgegateway',
            'public_broker_url',
            'string',
            false,
            null,
            'The browser-routable edge broker URL, including the proxy path prefix.',
            'https://api-v2.truckwash.io/edge-broker',
            false,
            trim((string)(getenv('EDGE_PUBLIC_BROKER_URL') ?: '')) ?: 'https://api-v2.truckwash.io/edge-broker'
        );
    }
}
