<?php

use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Tree;

/**
 * @var string $module
 * @var string $title
 * @var Tree   $tree
 */

?>

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

<form method="post" action="<?= e(route('module', ['module' => $module, 'action' => 'Download', 'tree' => $tree->name()])) ?>" class="wt-page-options wt-page-options-clippings-download hidden-print">
    <?= csrf_field() ?>

    <div class="row form-group">
        <div class="col-sm-3 col-form-label wt-page-options-label">
            <?= I18N::translate('Export preferences') ?>
        </div>
        <div class="col-sm-9 wt-page-options-value">
            <?= view('admin/gedcom-export-options', ['tree' => $tree]) ?>
        </div>
    </div>

    <div class="row form-group">
        <div class="col-sm-3 col-form-label wt-page-options-label">
        </div>
        <div class="col-sm-9 wt-page-options-value">
            <button type="submit" class="btn btn-primary">
                <?= view('icons/download') ?>
                <?= I18N::translate('download') ?>
            </button>
            <a href="<?= e(route('module', ['module' => $module, 'action' => 'Show', 'tree' => $tree->name()])) ?>" class="btn btn-secondary">
                <?= view('icons/cancel') ?>
                <?= I18N::translate('cancel') ?>
            </a>
        </div>
    </div>
</form>
