<?php

declare(strict_types=1);

use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Place;

/**
 * @var string              $col_class
 * @var array<array<Place>> $columns
 */

?>

<div class="<?= $col_class ?> list_table">
    <div class="row">
        <span class="col wt-page-options-label me-1">
            <?= I18N::translate('Place hierarchy') ?>
        </span>
    </div>
    <div class="row">
        <?php foreach ($columns as $column) : ?>
            <ul class="col wt-page-options-value me-1 list-unstyled">
                <?php foreach ($column as $item) : ?>
                    <li>
                        <a href="<?= e($item->url()) ?>"><?= $item->placeName() ?></a>
                    </li>
                <?php endforeach ?>
            </ul>
        <?php endforeach ?>
    </div>
</div>
