<?php

declare(strict_types=1);

use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Statistics;

/** @var Statistics $stats */
?>

<h4 class="border-bottom p-2 mb-4">
    <?= I18N::translate('Age difference') ?>
</h4>

<div class="row row-cols-1 row-cols-md-2 g-3 mb-3">
    <div class="col">
        <div class="card">
            <h5 class="card-header">
                <?= I18N::translate('Age between siblings') ?>
            </h5>
            <?= $stats->topAgeBetweenSiblingsList() ?>
        </div>
    </div>

    <div class="col">
        <div class="card">
            <h5 class="card-header">
                <?= I18N::translate('Greatest age between siblings') ?>
            </h5>
            <div class="card-body">
                <?= $stats->topAgeBetweenSiblingsFullName() ?>
            </div>
        </div>
    </div>

    <div class="col">
        <div class="card">
            <h5 class="card-header">
                <?= I18N::translate('Age between husband and wife') ?>
            </h5>
            <?= $stats->ageBetweenSpousesMFList() ?>
        </div>
    </div>

    <div class="col">
        <div class="card">
            <h5 class="card-header">
                <?= I18N::translate('Age between wife and husband') ?>
            </h5>
            <?= $stats->ageBetweenSpousesFMList() ?>
        </div>
    </div>
</div>
