{% extends "@ContaoInstallation/layout.html.twig" %}
{% trans_default_domain 'ContaoInstallationBundle' %}

{% block main %}
  <fieldset class="tl_tbox nolegend">
    <h3>{{ 'an_error_occurred'|trans }}</h3>
    {% if errorCode == 1 %}
      <p class="tl_error">{{ 'unsupported_version'|trans }}</p>
      <p>{{ 'unsupported_version_explain'|trans([version]) }}</p>
    {% elseif errorCode == 2 %}
      <p class="tl_error">{{ 'unsupported_collation'|trans }}</p>
      <p>{{ 'unsupported_collation_explain'|trans([collation])|raw }}</p>
      <div id="sql_wrapper">
        <pre>doctrine:
    dbal:
        connections:
            default:
                default_table_options:
                    charset: utf8
                    collation: utf8_unicode_ci</pre>
      </div>
    {% elseif errorCode == 3 %}
      <p class="tl_error">{{ 'unsupported_engine'|trans }}</p>
      <p>{{ 'unsupported_engine_explain'|trans([engine])|raw }}</p>
      <div id="sql_wrapper">
        <pre>doctrine:
    dbal:
        connections:
            default:
                default_table_options:
                    engine: MyISAM
                    row_format: ~</pre>
      </div>
    {% elseif errorCode == 4 %}
      <p class="tl_error">{{ 'engine_mismatch'|trans }}</p>
      <p>{{ 'engine_mismatch_explain'|trans([engine])|raw }}</p>
      <div id="sql_wrapper">
        <pre>doctrine:
    dbal:
        connections:
            default:
                default_table_options:
                    charset: utf8
                    collation: utf8_unicode_ci</pre>
      </div>
    {% elseif errorCode == 5 %}
      <p class="tl_error">{{ 'innodb_large_prefix'|trans }}</p>
      <p>{{ 'innodb_large_prefix_explain'|trans|raw }}</p>
      <div id="sql_wrapper">
        <pre>doctrine:
    dbal:
        connections:
            default:
                default_table_options:
                    charset: utf8
                    collation: utf8_unicode_ci</pre>
      </div>
    {% elseif errorCode == 6 %}
      <p class="tl_error">{{ 'innodb_additional'|trans }}</p>
      <p>{{ 'innodb_additional_explain'|trans|raw }}</p>
      <div id="sql_wrapper">
        <pre>innodb_large_prefix = 1
innodb_file_format = Barracuda
innodb_file_per_table = 1</pre>
      </div>
    {% endif %}
  </fieldset>
{% endblock %}
