/**
 * CloudXM NFe Legacy Settings JavaScript
 */

function updateApiBaseUrl() {
    var environment = document.getElementById('cloudxm_nfe_environment').value;
    var baseUrlInput = document.getElementById('cloudxm_nfe_api_base_url');

    if (environment === 'sandbox') {
        baseUrlInput.value = 'https://sandbox-nfe.cloudxm.com.br/api';
    } else {
        baseUrlInput.value = 'https://nfe.cloudxm.com.br/api';
    }
}
