{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_script_hmr_mode %}
{{ parent() }}
{% if controllerName|lower=='auth' or controllerName|lower=='accountprofile' or controllerName|lower=='register' or (config('DmitsVatCheck.config.active')==1 and controllerName|lower=='checkout') %}
<script>
var dmitsVatCheckRegister="{{config('DmitsVatCheck.config.blockregister')}}";
var dmitsVatCheckOrder="{{config('DmitsVatCheck.config.blockorder')}}";
var dmitsVatCheckAlwaysVatId="{{config('DmitsVatCheck.config.alwaysvatid')}}";
{% if controllerName|lower=='checkout'%}
var dmitsVatCheckCustomerVatIds="{{context.customer.vatIds|join(',')}}";
var dmitsVatCheckCustomerAccountType="{% if context.customer.company is empty %}0{% else %}1{% endif %}";
{% endif %}
var dmitsVatCheckShopid="{{appShopId}}";
var dmitsVatCheckErrorVatId="{{"dmits.vatcheck.error.vatid"|trans}}";
var dmitsVatCheckErrorVatIdForm="{{"dmits.vatcheck.error.vatidform"|trans|raw|escape}}";
var dmitsVatCheckErrorOrderError="{{"dmits.vatcheck.error.ordererror"|trans|raw|escape}}";
</script>
{% endif %}
<script>
var dmitsVatCheckPage="{{controllerName|lower}}";
var dmitsVatCheckActive="{{config('DmitsVatCheck.config.active')}}";
</script>
{% endblock %}