<?php

declare(strict_types=1);

use Fisharebest\Webtrees\GedcomRecord;
use Fisharebest\Webtrees\I18N;

/**
 * @var array<string,string> $options
 * @var GedcomRecord         $record
 * @var string               $title
 */

?>

<h2 class="wt-page-title"><?= $title ?></h2>

<form method="post" class="wt-page-options wt-page-options-clippings d-print-none">
    <input type="hidden" name="xref" value="<?= e($record->xref()) ?>">

    <div class="row">
        <div class="col-sm-3 col-form-label wt-page-options-label">
            <?= I18N::translate('Add to the clippings cart') ?>
        </div>
        <div class="col-sm-9 wt-page-options-value">
            <?= view('components/radios', ['name' => 'option', 'options' => $options, 'selected' => key($options)]) ?>
        </div>
    </div>

    <div class="row mb-3">
        <div class="col-sm-3 wt-page-options-label"></div>
        <div class="col-sm-9 wt-page-options-value">
            <button type="submit" class="btn btn-primary">
                <?= view('icons/save') ?>
                <?= /* I18N: A button label. */ I18N::translate('continue') ?>
            </button>

            <a class="btn btn-secondary" href="<?= e($record->url()) ?>">
                <?= view('icons/cancel') ?>
                <?= /* I18N: A button label. */ I18N::translate('cancel') ?>
            </a>
        </div>
    </div>

    <?= csrf_field() ?>
</form>
