<?php
    $sections = \lim\portal\controllers\interviewController::SECTION_NAMES;
    $curStep = array_flip(array_keys($sections))[$_view["step"]] + 1;
    $s = 1;
    $progress = round($curStep * 100 / count($sections));

?>
<div class="container interview text-center space-mb-md">
    <div class="row gx-2">
        <?php foreach ($sections as $key => $name) { ?>
            <div class="col d-none d-lg-inline-block">
                <div class="interview-steps mb-3 <?= $key == $_view["step"] ? "active" : " "; ?>"><?= $s++; ?>. <?= $name; ?></div>
                <?php if ($key == $_view["step"]) { ?>
                <div class="p-1 interview-steps bg-darkgreen"></div>
                <?php } else { ?>
                <div class="p-1 interview-steps bg-darkgray""></div>
                <?php } ?>
            </div>
        <?php } ?>
    </div>
    <div class="row mb-5 mb-md-0">
        <div class="col text-start d-block d-lg-none">
            <p class="mb-3"><b>Schritt <?= $curStep; ?> / 5: <?= $sections[$_view["step"]]; ?></b></p>
            <div class="progress bg-darkgray" role="progressbar" aria-label="Basic example" aria-valuenow="<?= $progress; ?>" aria-valuemin="0" aria-valuemax="100">
                <div class="progress-bar bg-darkgreen" style="width: <?= $progress; ?>%"></div>
            </div>
        </div>
    </div>
</div>