<?php

declare(strict_types=1);

use Fisharebest\Webtrees\I18N;

/**
 * @var string|null $class
 * @var string|null $id
 * @var string      $name
 * @var int         $selected
 * @var array<int>  $options
 */

?>

<select
    class="form-select <?= $class ?? '' ?>"
    name="<?= e($name) ?>"
    id="<?= e($id ?? $name) ?>"
>
    <?php foreach ($options as $n) : ?>
        <option value="<?= $n ?>" <?= $n === $selected ?  'selected' : '' ?>>
            <?= I18N::number($n) ?>
        </option>
    <?php endforeach ?>
</select>
