{{define "confirm" -}}
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Confirmation needed</title>
        <link rel="stylesheet" href="/assets/styles.css"/>
        <link rel="stylesheet" href="/assets/bootstrap.min.css">
    </head>
    <body>
    <main class="container mt-5">
        <h1 class="display-4 py-4">Confirmation needed</h1>
        {{ template "flashes" .flashes }}
        <div class="border border-{{ .level }} rounded p-3">
            {{ if .question }}
                <div>
                    <h3 class="text-{{ .level }}">{{ .question }}</h3>
                </div>
            {{ end }}
            <div class="mt-3">
                <p class="fs-4 text">{{ .description }}</p>
            </div>
            <form method="post" action="{{ .action }}">
                {{ if .messages }}
                    <ul>
                        {{range $id, $message := .messages}}
                            <li>
                                {{ $message.MessageId }}
                                <input type="hidden" name="id-{{ $id }}" value="on"/>
                                <input type="hidden" name="mid-{{ $id }}" value="{{ $message.MessageId }}"/>
                                <input type="hidden" name="rh-{{ $id }}" value="{{ $message.ReceiptHandle }}"/>
                            </li>
                        {{end}}
                    </ul>
                {{end}}
                <input type="hidden" name="_csrf" value="{{ .csrf }}"/>
                <a href="{{ .cancelURL }}" class="btn btn-outline-dark btn-lg px-4">{{ .cancel }}</a>
                {{ if .confirm -}}
                    <button class="btn btn-{{ .level }} btn-lg px-5">{{ .confirm }}</button>{{- end }}
            </form>
        </div>
    </main>
    </body>
    <script src="/assets/bootstrap.js"></script>
    </html>
{{end}}