{% extends 'layout.html.twig' %}
{% set typeTitles = {info:'site.message.info'|trans, warning:'site.message.warning'|trans, error: 'site.message.error'|trans} %}
{% set title = title|default(typeTitles[type]) %}
{% block title %}{{ title|trans }} - {{ parent() }}{% endblock %}
{% block head_scripts %}{{ script|default('')|raw }}{% endblock %}
{% do script(['app/js/default/message/index.js']) %}

{% block content %}
<div id="page-message-container" class="page-message-container" data-goto="{{ goto }}" data-duration={{ duration }}>
  <div class="page-message-panel">
    <div class="page-message-heading">
      <h2 class="page-message-title">{{ title|trans }}</h2>
    </div>
    <div class="page-message-body">{{ message|default('')|trans }}</div>
  </div>
</div>
{% endblock %}
