<?php $current_page = basename($_SERVER['PHP_SELF']); ?>
            <nav id="sidebar" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
                <div class="position-sticky pt-3">
                    <ul class="nav flex-column">
                        <li class="nav-item">
                            <a class="nav-link <?= ($current_page == 'index.php' || $current_page == '') ? 'active' : '' ?>" aria-current="page" href="/">
                                <i class="bi bi-kanban"></i>
                                <span class="nav-link-text"><?= t('menu.process_dashboard', 'Pulpit procesów') ?></span>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link <?= ($current_page == 'calendar.php') ? 'active' : '' ?>" href="calendar.php">
                                <i class="bi bi-calendar-event"></i>
                                <span class="nav-link-text"><?= t('menu.calendar', 'Kalendarz') ?></span>
                            </a>
                        </li>

                        <li class="nav-item">
                            <a class="nav-link collapsed" href="#settings-submenu" data-bs-toggle="collapse" aria-expanded="false">
                                <i class="bi bi-gear"></i>
                                <span class="nav-link-text"><?= t('menu.settings', 'Ustawienia') ?></span>
                            </a>
                            <ul class="nav flex-column collapse" id="settings-submenu" data-bs-parent="#sidebar">
                                <li class="nav-item submenu-item">
                                    <a class="nav-link <?= ($current_page == 'event_types.php') ? 'active' : '' ?>" href="event_types.php">
                                        <i class="bi bi-tags"></i>
                                        <span class="nav-link-text"><?= t('menu.event_types', 'Typy zdarzeń') ?></span>
                                    </a>
                                </li>
                                <li class="nav-item submenu-item">
                                    <a class="nav-link <?= ($current_page == 'bni_groups.php') ? 'active' : '' ?>" href="bni_groups.php">
                                        <i class="bi bi-people"></i>
                                        <span class="nav-link-text"><?= t('menu.bni_groups', 'Grupy BNI') ?></span>
                                    </a>
                                </li>
                                <li class="nav-item submenu-item">
                                    <a class="nav-link <?= ($current_page == 'functions.php') ? 'active' : '' ?>" href="functions.php">
                                        <i class="bi bi-person-rolodex"></i>
                                        <span class="nav-link-text"><?= t('menu.functions', 'Funkcje') ?></span>
                                    </a>
                                </li>
                            </ul>
                        </li>

                        <?php if (isset($_SESSION['role']) && $_SESSION['role'] === 'admin'): ?>
                        <li class="nav-item">
                            <a class="nav-link <?= ($current_page == 'process_definitions.php') ? 'active' : '' ?>" href="process_definitions.php">
                                <i class="bi bi-diagram-3"></i>
                                <span class="nav-link-text"><?= t('menu.process_definitions', 'Definicje procesów') ?></span>
                            </a>
                        </li>
                        <?php endif; ?>

                    </ul>
                </div>
            </nav>