<nav class="navbar navbar-expand-lg navbar-dark bg-dark px-5">
    <div class="container-fluid">
        <a class="navbar-brand" href="<?= route_to('home') ?>">COPARMEX</a>
        <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarSupportedContent">
            <ul class="navbar-nav ms-auto mb-2 mb-lg-0">
                <?php helper('auth');
                if (logged_in()) : ?>
                    <li class="nav-item">
                        <a class="nav-link" href="<?= route_to('logout') ?>"><i class="fa-solid fa-arrow-right-from-bracket"></i> Cerrar Sesión</a>
                    </li>
                <?php else : ?>
                    <li class="nav-item me-3">
                        <a class="nav-link" href="<?= route_to('register') ?>"><i class="fa-solid fa-user"></i> Crear Cuenta</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="<?= route_to('login') ?>"><i class="fa-solid fa-arrow-right-to-bracket"></i> Iniciar Sesión</a>
                    </li>
                <?php endif; ?>
            </ul>
        </div>
    </div>
</nav>