<?php

/**
 * @var int $authStepCurrent 1-based current step (1, 2, or 3)
 * @var int $authStepTotal   total number of steps (2 or 3)
 */

$authStepCurrent = (int) ($authStepCurrent ?? 0);
$authStepTotal = (int) ($authStepTotal ?? 0);
if ($authStepCurrent < 1 || $authStepTotal < 2) {
    return;
}
?>
<div class="login-step-indicator" aria-hidden="true">
    <?php for ($i = 1; $i <= $authStepTotal; $i++): ?>
        <span class="login-step-indicator-dot<?php if ($i === $authStepCurrent): ?> is-active<?php elseif ($i < $authStepCurrent): ?> is-completed<?php endif; ?>"></span>
        <?php if ($i < $authStepTotal): ?>
            <span class="login-step-indicator-line<?php if ($i < $authStepCurrent): ?> is-completed<?php endif; ?>"></span>
        <?php endif; ?>
    <?php endfor; ?>
</div>
