{% extends "base.html" %}
{% load render_bundle from webpack_loader %}
{% load static %}
{% load i18n %}
{% load l10n %}

{% block title %}{% trans 'Ingredient Editor' %}{% endblock %}

{% block content %}

    <div class="row">
        <div class="col col-md-12">
            <h3>{% trans 'Ingredient Editor' %}</h3>
        </div>
    </div>
    <div id="app">

        <ingredient-editor-view></ingredient-editor-view>
    </div>


{% endblock %}


{% block script %}
    {% if debug %}
        <script src="{% url 'js_reverse' %}"></script>
    {% else %}
        <script src="{% static 'django_js_reverse/reverse.js' %}"></script>
    {% endif %}

    <script type="application/javascript">
        window.DEFAULT_FOOD = {{ food_id }}
        window.DEFAULT_UNIT = {{ unit_id }}
        window.CUSTOM_LOCALE = '{{ request.LANGUAGE_CODE }}'
    </script>

    {% render_bundle 'ingredient_editor_view' %}
{% endblock %}