{% macro init_frontend_loader() %}
    {% set configurations = javascript_configurations(app.user)|merge({
        login: path('login'),
        locale: app.request.locale,
        direction: tabler_bundle.rightToLeft ? 'rtl' : 'ltr',
        first_dow_iso: iso_day_by_name(app.user.firstDayOfWeek),
    }) %}
    <script type="text/javascript">
        window.addEventListener('load', function() {
            const loader = new KimaiWebLoader({{ configurations|json_encode|raw }},{{ javascript_translations()|json_encode|raw }});
            window.kimai = loader.getKimai();
        });
    </script>
{% endmacro %}
