<?php

use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;

/* default/_flash_messages.html.twig */
class __TwigTemplate_4aaf151fcb3bf1eea494975c1b6e23331fc04d6f9a2f8932fb8452bd849d0265 extends Template
{
    private $source;
    private $macros = [];

    public function __construct(Environment $env)
    {
        parent::__construct($env);

        $this->source = $this->getSourceContext();

        $this->parent = false;

        $this->blocks = [
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        $macros = $this->macros;
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "default/_flash_messages.html.twig"));

        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "default/_flash_messages.html.twig"));

        // line 9
        yield "
";
        // line 17
        if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 17, $this->source); })()), "request", [], "any", false, false, false, 17), "hasPreviousSession", [], "any", false, false, false, 17)) {
            // line 19
            yield "        <div aria-live=\"polite\" aria-atomic=\"true\" style=\"position: fixed; bottom: 1rem; right: 1rem; z-index: 2000;\" class=\"messages\">
        ";
            // line 20
            $context['_parent'] = $context;
            $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 20, $this->source); })()), "flashes", [], "any", false, false, false, 20));
            foreach ($context['_seq'] as $context["type"] => $context["messages"]) {
                // line 21
                yield "            ";
                $context['_parent'] = $context;
                $context['_seq'] = CoreExtension::ensureTraversable($context["messages"]);
                foreach ($context['_seq'] as $context["_key"] => $context["message"]) {
                    // line 22
                    yield "                ";
                    // line 23
                    yield "                <div class=\" toast alert alert-dismissible alert-";
                    yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["type"], "html", null, true);
                    yield " fade show\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" style=\"padding:0.3rem;width:auto;\">
                    <div class=\"toast-body\">
                        ";
                    // line 25
                    yield $context["message"];
                    yield "
                    </div>
";
                    // line 28
                    yield "                </div>
            ";
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['_key'], $context['message'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
                // line 30
                yield "        ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['type'], $context['messages'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 31
            yield "    </div>
";
        }
        
        $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);

        
        $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);

        return; yield '';
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName()
    {
        return "default/_flash_messages.html.twig";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable()
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo()
    {
        return array (  87 => 31,  81 => 30,  74 => 28,  69 => 25,  63 => 23,  61 => 22,  56 => 21,  52 => 20,  49 => 19,  47 => 17,  44 => 9,);
    }

    public function getSourceContext()
    {
        return new Source("{#
   This is a template fragment designed to be included in other templates
   See https://symfony.com/doc/current/templates.html#including-templates

   A common practice to better distinguish between templates and fragments is to
   prefix fragments with an underscore. That's why this template is called
   '_flash_messages.html.twig' instead of 'flash_messages.html.twig'
#}

{#
   The check is needed to prevent starting the session when looking for \"flash messages\":
   https://symfony.com/doc/current/session.html#avoid-starting-sessions-for-anonymous-users

   TIP: With FOSHttpCache you can also adapt this to make it cache safe:
   https://foshttpcachebundle.readthedocs.io/en/latest/features/helpers/flash-message.html
#}
{% if app.request.hasPreviousSession %}
{#    <div class=\"messages\">#}
        <div aria-live=\"polite\" aria-atomic=\"true\" style=\"position: fixed; bottom: 1rem; right: 1rem; z-index: 2000;\" class=\"messages\">
        {% for type, messages in app.flashes %}
            {% for message in messages %}
                {# Bootstrap alert, see https://getbootstrap.com/docs/3.4/components/#alerts #}
                <div class=\" toast alert alert-dismissible alert-{{ type }} fade show\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\" style=\"padding:0.3rem;width:auto;\">
                    <div class=\"toast-body\">
                        {{ message|raw }}
                    </div>
{#                    <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"alert\" aria-label=\"Close\" style=\"opacity:1\"></button>#}
                </div>
            {% endfor %}
        {% endfor %}
    </div>
{% endif %}
", "default/_flash_messages.html.twig", "/builds/dev/refonte_sav/templates/default/_flash_messages.html.twig");
    }
}
