{% extends '_layouts/base' %}

{% import '_includes/forms.twig' as forms %}
{% set fullPageForm = true %}

{% set bodyClass = 'honcho-announcement' %}

{% set settings = settings ?? null %}
{% set title = settings.modalTitle %}
{% set modalTitle = settings.modalTitle ?? null %}
{% set bodyText = settings.bodyText ?? null %}
{% set linkButtonText = settings.linkButtonText ?? null %}
{% set linkButtonUrl = settings.linkButtonUrl ?? null %}
{% set buttonText = settings.buttonText is not empty ? settings.buttonText : "Continue" %}
{% set buttonRedirectUrl = settings.buttonRedirectUrl ? settings.buttonRedirectUrl : "/admin/dashboard" %}

{% block body %}
    <div id="main-content">
        <div id="honcho-announcement" class="pane">
            <div class="readable">
                <svg width="49" height="46" viewBox="0 0 49 46" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <g clip-path="url(#clip0_6383_2288)">
                        <path d="M49 32.7794L27.9041 0L23.4437 2.8415L24.8036 4.95561L5.54232 31.0268L4.46465 29.3508L0.00427246 32.1923L7.87729 44.4261L12.3377 41.5846L11.2899 39.9554L17.9826 38.6027C18.0297 38.6836 18.0724 38.7644 18.1195 38.8452L20.2791 42.1419C21.8015 44.4516 24.3503 45.8852 27.1258 45.9957C29.8969 46.1063 32.5569 44.8813 34.2632 42.6991C35.9653 40.5212 36.5084 37.6627 35.7258 35.0168L39.6601 34.2214L43.184 33.5068L44.5482 35.6251L49.0085 32.7836L49 32.7794ZM12.389 30.6397L27.8741 9.69003L30.8035 14.2458L12.389 30.6397ZM29.4522 40.5339C27.7801 41.5931 25.5563 41.1082 24.4872 39.445L23.2726 37.5308L30.7907 36.008C31.5476 37.6371 30.9746 39.5726 29.4522 40.5339Z" fill="#d81f23"/>
                    </g>
                    <defs>
                        <clipPath id="clip0_6383_2288">
                            <rect width="49" height="46" fill="white"/>
                        </clipPath>
                    </defs>
                </svg>

                <h1 id="announce-heading">
                    {{ modalTitle }}
                </h1>

                <p id="announce-body">
                    {{ bodyText }}
                </p>

                <div class="buttons" style="justify-content: space-between;">
                    {% if linkButtonUrl and linkButtonText is not empty %}
                        <a href="{{ linkButtonUrl }}" class="btn link-btn go">
                            {{ linkButtonText }}
                        </a>
                    {% endif %}

                    <div></div>

                    <a href="{{ buttonRedirectUrl }}" id="continueBtn" class="btn link-btn">
                        {{ buttonText }}
                    </a>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
