<?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="Saving 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="Emptying Definition..."
                        data-request-confirm="Do you really want to empty this definition?">
                    </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">Return to settings</a></p>
    </div>

<?php endif ?>