<?php

use Fisharebest\Webtrees\I18N;

/**
 * @var string               $controls
 * @var string               $filter
 * @var array<string,string> $filters
 * @var array<string,string> $formats
 * @var string               $start
 */

?>

<div class="row form-group">
    <label class="col-sm-3 col-form-label" for="filter">
        <?= I18N::translate('Show only individuals, events, or all') ?>
    </label>
    <div class="col-sm-9">
        <?= view('components/select', ['name' => 'filter', 'selected' => $filter, 'options' => ['indi' => I18N::translate('Individuals'), 'event' => I18N::translate('Facts and events'), 'all' => I18N::translate('All')]]) ?>
    </div>
</div>

<fieldset class="row form-group">
    <legend class="col-form-label col-sm-3">
        <?= I18N::translate('Type') ?>
    </legend>
    <div class="col-sm-9">
        <?php foreach ($formats as $type => $label) : ?>
            <?= view('components/checkbox', ['label' => $label, 'name' => 'filter_' . $type, 'checked' => (bool) $filters[$type]]) ?>
        <?php endforeach ?>
    </div>
</fieldset>

<div class="row form-group">
    <label class="col-sm-3 col-form-label" for="controls">
        <?= I18N::translate('Show slide show controls') ?>
    </label>
    <div class="col-sm-9">
        <?= view('components/radios-inline', ['name' => 'controls', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $controls]) ?>
    </div>
</div>

<div class="row form-group">
    <label class="col-sm-3 col-form-label" for="start">
        <?= I18N::translate('Start slide show on page load') ?>
    </label>
    <div class="col-sm-9">
        <?= view('components/radios-inline', ['name' => 'start', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $start]) ?>
    </div>
</div>
