<?php if (!$this->fatalError): ?>

    <?= Form::open(['class' => 'layout', 'id' => 'sitemapForm']) ?>
        <div class="layout-row min-size">
            <div class="scoreboard padded-container">
                <div data-control="toolbar">
                    <div class="scoreboard-item title-value">
                        <h4><?= e(trans('rainlab.sitemap::lang.plugin.name')) ?></h4>
                        <p><?= e($themeName) ?></p>
                        <p class="description">
                            <?= e(trans('rainlab.sitemap::lang.item.location')) ?> <a href="<?= $sitemapUrl ?>" target="_blank"><?= $sitemapUrl ?></a>
                        </p>
                    </div>
                </div>
            </div>
        </div>

        <div class="layout-row">
            <?= $this->formRender() ?>
        </div>

        <div class="padded-container">
            <div class="form-buttons">
                <div class="loading-indicator-container">
                    <button
                        type="submit"
                        data-request="onSave"
                        data-request-data="redirect:0"
                        data-hotkey="ctrl+s, cmd+s"
                        data-load-indicator="<?= e(trans('rainlab.sitemap::lang.item.save_definition')) ?>"
                        class="btn btn-primary">
                        <?= e(trans('backend::lang.form.save')) ?>
                    </button>
                    <button
                        type="button"
                        class="oc-icon-trash-o btn-icon danger pull-right"
                        data-request="onDelete"
                        data-load-indicator="<?= e(trans('rainlab.sitemap::lang.item.load_indicator')) ?>"
                        data-request-confirm="<?= e(trans('rainlab.sitemap::lang.item.empty_confirm')) ?>">
                    </button>
                    <span class="btn-text">
                        <?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('rainlab/sitemap/definitions') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
                    </span>
                </div>
            </div>
        </div>

    <?= Form::close() ?>

<?php else: ?>

    <div class="padded-container">
        <p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
        <p><a href="<?= Backend::url('system/settings') ?>" class="btn btn-default"><?= e(trans('system::lang.settings.return')) ?></a></p>
    </div>

<?php endif ?>
