<?php

echo 'var modulos_acciones_list = ' . $modulos_acciones_ids_json . ';';
echo 'var menu_groups = ' . $routes_json . ';';

$temp_path = getcwd();
foreach ($states as $state) {
    $file_name = realpath($temp_path . '/' . $js_routes_path . 'states/' . $state . '.js');
    if (file_exists($file_name)) {
        require_once $file_name;
    } else {
        echo 'console.error("State file not found: ' . $state . '.js");';
        exit();
    }
}

