{% load app_filters %}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewpoint" content="with=device, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Firebird - {{ sub_title }}</title>
    <link rel="shortcut icon" href="/static/images/logo.jpeg">

    {% if ENV_enable_js_debug %}
        <link rel="stylesheet" href="https://unpkg.com/bootstrap@5.2.3/dist/css/bootstrap.css">
        <link rel="stylesheet" href="https://unpkg.com/react-bootstrap-table-next@4.0.3/dist/react-bootstrap-table2.css">
        <link rel="stylesheet" href="https://unpkg.com/react-bootstrap-table2-paginator@2.1.2/dist/react-bootstrap-table2-paginator.css">
    {% else %}
        <link rel="stylesheet" href="https://unpkg.com/bootstrap@5.2.3/dist/css/bootstrap.min.css">
        <link rel="stylesheet" href="https://unpkg.com/react-bootstrap-table-next@4.0.3/dist/react-bootstrap-table2.min.css">
        <link rel="stylesheet" href="https://unpkg.com/react-bootstrap-table2-paginator@2.1.2/dist/react-bootstrap-table2-paginator.min.css">
    {% endif %}

    <link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/redmond/jquery-ui.css">

    {% if ENV_enable_js_debug %}
        <script src="https://unpkg.com/lodash@4.17.21/lodash.js"></script>
        <script src="https://unpkg.com/jquery@3.6.4/dist/jquery.js"></script>
        <script src="https://unpkg.com/react@16.14.0/umd/react.development.js"></script>
        <script src="https://unpkg.com/react-dom@16.14.0/umd/react-dom.development.js"></script>
        <!-- 
            wait for https://github.com/react-bootstrap/react-bootstrap/issues/6135 to get fixed
            <script src="https://unpkg.com/react-bootstrap@2.0.2/dist/react-bootstrap.js"></script> 
        -->
        <script src="https://unpkg.com/react-bootstrap@2.7.4/dist/react-bootstrap.min.js"></script>
        <script src="https://unpkg.com/react-bootstrap-table-next@4.0.3/dist/react-bootstrap-table-next.js"></script>
        <script src="https://unpkg.com/react-bootstrap-table2-filter@1.3.3/dist/react-bootstrap-table2-filter.js"></script>
        <script src="https://unpkg.com/react-bootstrap-table2-paginator@2.1.2/dist/react-bootstrap-table2-paginator.js"></script>
        <script src="https://code.jquery.com/ui/1.13.0/jquery-ui.js"></script>
    {% else %}
        <script src="https://unpkg.com/lodash@4.17.21/lodash.min.js"></script>
        <script src="https://unpkg.com/jquery@3.6.4/dist/jquery.min.js"></script>
        <script src="https://unpkg.com/react@16.14.0/umd/react.production.min.js"></script>
        <script src="https://unpkg.com/react-dom@16.14.0/umd/react-dom.production.min.js"></script>
        
        <script src="https://unpkg.com/react-bootstrap@2.7.4/dist/react-bootstrap.min.js"></script>
        <script src="https://unpkg.com/react-bootstrap-table-next@4.0.3/dist/react-bootstrap-table-next.min.js"></script>
        <script src="https://unpkg.com/react-bootstrap-table2-filter@1.3.3/dist/react-bootstrap-table2-filter.min.js"></script>
        <script src="https://unpkg.com/react-bootstrap-table2-paginator@2.1.2/dist/react-bootstrap-table2-paginator.min.js"></script>
        <script src="https://code.jquery.com/ui/1.13.0/jquery-ui.min.js"></script>
    {% endif %}


    <meta name="csrf" content="{{ csrf_token }}">
    <meta name="user" content="{{user|user_to_json}}">
    {% if app_context %}
    <meta name="app_context" content="{{ app_context }}">
    {% endif %}
    {% if init_menu_key %}
    <meta name="init_menu_key" content="{{ init_menu_key }}">
    {% endif %}

    {% for script in scripts %}
    <script src="{{ script }}"></script>
    {% endfor %}
</head>

<body>
    <div id="global-header"></div>
    <div id='app'></div>
</body>
</html>
