<?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('Names') ?>
</h4>

<div class="mb-3">
    <div class="row">
        <div class="col-12 col-lg-6">
            <div class="card-deck">
                <div class="mb-3 col-12">
                    <div class="card m-0">
                        <h5 class="card-header border-bottom-0">
                            <?= I18N::translate('Total surnames') ?>
                            <span class="badge badge-secondary badge-pill float-right"><?= $stats->totalSurnames() ?></span>
                        </h5>
                    </div>
                </div>

                <div class="mb-3 col-12">
                    <div class="card m-0">
                        <h5 class="card-header">
                            <?= I18N::translate('Top surnames') ?>
                        </h5>
                        <div class="card-body">
                            <?= $stats->chartCommonSurnames() ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-12 col-lg-6">
            <div class="card-deck">
                <div class="mb-3 col-12">
                    <div class="card m-0">
                        <h5 class="card-header border-bottom-0">
                            <?= I18N::translate('Total given names') ?>
                            <span class="badge badge-secondary badge-pill float-right"><?= $stats->totalGivennames() ?></span>
                        </h5>
                    </div>
                </div>

                <div class="mb-3 col-12">
                    <div class="card m-0">
                        <h5 class="card-header">
                            <?= I18N::translate('Top given names') ?>
                        </h5>
                        <div class="card-body">
                            <?= $stats->chartCommonGiven() ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
