<div class="d-flex align-items-center overflow-x-scroll bg-secondary-subtle border-bottom shadow-sm p-2 mb-2">
    <div class="d-block me-2">
        <!-- <div class="small text-muted lh-1">Admin</div> -->
        <span class="text-nowrap fw-bold lh-1">Projects (<?php echo count($projects); ?>)</span>
    </div>
    <div class="hstack gap-2 ms-auto">
        <button type="button" class="btn btn-sm btn-danger" title="New project" data-bs-toggle="modal" data-bs-target="#newProjectModal">
            <i class="bi bi-plus"></i>
        </button>

        <?php if ( $view === 'c' ) : ?>
            <div class="vr"></div>

            <div class="input-group">
                <select class="form-select form-select-sm" id="sort">
                    <option selected>Sort</option>
                    <option value="s">Date Started</option>
                    <option value="m">Date Modified</option>
                    <option value="i">Project ID</option>
                    <option value="t">Title</option>
                </select>
                <button class="btn btn-sm btn-danger" type="button"><i class="bi bi-arrow-up"></i></button>
            </div>
        <?php endif; ?>

        <div class="vr"></div>

        <div class="btn-group btn-group-sm me-auto" role="group">
            <input type="radio" class="btn-check" name="admin-view" id="admin-view-table" autocomplete="off"<?php if ( $view === 't' ) : ?> checked="checked"<?php endif; ?> onclick="window.location = '<?php echo URL_APP_ADMIN; ?>/?page=<?php echo $page; ?>&view=t'">
            <label class="btn btn-outline-danger" for="admin-view-table">
                <i class="bi bi-table"></i>
            </label>

            <input type="radio" class="btn-check" name="admin-view" id="admin-view-card" autocomplete="off"<?php if ( $view === 'c' ) : ?> checked="checked"<?php endif; ?> onclick="window.location = '<?php echo URL_APP_ADMIN; ?>/?page=<?php echo $page; ?>&view=c'">
            <label class="btn btn-outline-danger" for="admin-view-card">
                <i class="bi bi-grid"></i>
            </label>
        </div>
    </div>
</div>