<?php
    if(ENVIRONNEMENT == "DEV"){
        $titleHead = "<span class=\"badge\" style=\"background-color:red; margin-left: 5px;\">DEV</span>";
    } elseif(ENVIRONNEMENT == "R7"){
        $titleHead = "<span class=\"badge\" style=\"background-color:red; margin-left: 5px;\">R7</span>";
    } elseif(ENVIRONNEMENT == "PREPROD"){
        $titleHead = "<span class=\"badge\" style=\"background-color:red; margin-left: 5px;\">PREPROD</span>";
    } elseif(ENVIRONNEMENT == "PROD"){
        $titleHead = "";
    }

    if($_SERVER['HTTP_HOST'] == DOMAIN_EVENTS){
        $logoHead = "img/logo.png";
    } else {
        $logoHead = "img/logo-control.png";
    }

    if(debug::isFile("debug")){
        $titleDebug = "<span class=\"badge\" style=\"background-color:red; margin-left:5px;\">MODE DEBUG</span>";
    } else {
        $titleDebug = "";
    }
?>
<nav class="navbar navbar-light bg-light lighten-4 shadow-lg">
    <?php echo "<div style=\"margin: 0 0 0 120px; position: absolute;\">" . $titleHead . $titleDebug . "</div>"; ?>
    <img src="<?php echo $logoHead ?>" style="max-width: 80%;" id="icon" alt="CSE Invent" />
    <button class="navbar-toggler p-1" style="margin-right: 15px;" type="button" data-toggle="collapse" data-target="#navMenu" aria-controls="navbarSupportedContent1" aria-expanded="false">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navMenu">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item active">
                <div id="logout" class="nav-link" style="text-align: center; font-size: 1.2em; cursor:pointer;">Se déconnecter</div>
            </li>
        </ul>
    </div>
</nav>
