<div class="d-flex align-items-center overflow-x-scroll bg-secondary-subtle border-bottom shadow-sm p-2 mb-2">
    <span class="text-nowrap fw-bold me-5"><?php echo $userProject['title']; ?> Project</span>
    <div class="hstack gap-2 ms-auto">
        <button class="btn btn-sm btn-danger btbAction" type="button" data-action="click" data-target="new group" data-bs-toggle="modal" data-bs-target="#selectionsNewGroupModal" title="New group">
            <i class="bi bi-plus"></i>
        </button>
        <?php if ( count($groups) > 0 ) : ?>
            <button class="btn btn-sm btn-danger btbAction" type="button" data-action="click" data-target="generate pdf" data-bs-toggle="modal" data-bs-target="#generatePdfModal" title="Generate PDF">
                <i class="bi bi-card-checklist"></i>
            </button>
        <?php endif; ?>
        <?php if ( $user['admin'] ) : ?>
            <form method="GET" action="<?php echo URL_APP ?>/selections/">
                <select id="projectSelect" class="form-select form-select-sm" name="projectId" onchange="if(this.value != 'Load project'){this.form.submit()}" style="width:auto;">
                    <option>Load project</option>
                    <?php foreach ( $projects as $project ) : ?>
                        <option value="<?php echo $project['id']; ?>" ><?php echo $project['title']; ?></option>
                    <?php endforeach; ?>
                </select>
            </form>
        <?php endif; ?>
    </div>
</div>