{% trans_default_domain 'messages' %}
<!DOCTYPE html>
<!--[if IE 8]>    <html class="no-js lt-ie9" lang="fr-FR"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="fr-FR">
<!--<![endif]-->
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>{{ title ?? KOH_APP_TITLE ?? 'Kohinos' }}</title>
    <meta name="description" content="{{ description|default('Kohinos : Outil de gestion de monnaie locale complémentaire') }}" />
    <meta name="keywords" content="{{ keywords|default('Kohinos, mlc, mlcc, monnaie locale, monnaies locales') }}" />
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">

    {# FAVICON #}
    {% block favicon %}
        <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon/apple-touch-icon.png">
        <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon/favicon-32x32.png">
        <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon/favicon-16x16.png">
        <link rel="manifest" href="/images/favicon/site.webmanifest">
    {% endblock favicon %}

	{# POUR AJOUTER DES META ( like og: ) #}
	{% block meta %} {% endblock meta %}

 	{% block stylesheets %}
        {{ encore_entry_link_tags('app') }}
    {% endblock stylesheets %}

    <link rel="stylesheet" href="/leaflet/leaflet.css">
	{# POUR AJOUTER DES CSS #}
 	{% block css %} {% endblock css %}
</head>

<body>
    <input type="hidden" name="koh_map_center" id="koh_map_center" value='{{KOH_MAP_CENTER|default('')}}' />
    <input type="hidden" name="koh_map_zoom" id="koh_map_zoom" value='{{KOH_MAP_ZOOM|default('')}}' />

		{% include 'common/modale_choix_groupe.html.twig' %}
    {% include 'common/modale_confirmation_transaction.html.twig' %}

    <!-- HEADER -->
    {% block header %}
      {% include 'common/header.html.twig' %}
    {% endblock header %}

    <!-- CONTAINER -->
    <div class="container">
        {% include 'common/flash-messages.html.twig' %}
        {% block content %}
        <!-- CONTENT -->
        {% endblock content %}
    </div>

    <!-- FOOTER -->
    {% block footer %}
      {% include 'common/footer.html.twig' %}
    {% endblock footer %}

	{% block javascripts %}
        {{ encore_entry_script_tags('app') }}
    {% endblock javascripts %}

    {# POUR AJOUTER DES JS #}
    {% block js %} {% endblock js %}

    {# AFFICHAGE DE LA MODALE DE CHOIX DU RÔLE (groupe associé aux rôles) #}
    {% if showModalGroupChoice() %}
        <script type="text/javascript">
            $(document).ready(function() {
                $('#roleGroupeModal').modal('show');
            });
        </script>
    {% endif %}
    <script type="text/javascript">
        $('.viewChoiceGroup').on('click', function () {
            $('#roleGroupeModal').modal('show');
        });
    </script>
    {# https://stackoverflow.com/questions/34369951/how-to-get-add-to-home-screen-pop-up-on-site-open-in-mobile-browser #}
    <script>
     if ('serviceWorker' in navigator) {
        if ('serviceWorker' in navigator) {
            navigator.serviceWorker.register('/js/service-worker.js')
              .then(function(reg){
             }).catch(function(err) {
            });
        }
     }
    </script>

</body>

</html>
