<?php

declare(strict_types=1);

use Fisharebest\Webtrees\I18N;

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

?>

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