{% set premsAutoComplete = page.extensions.premsAutoComplete %}
<script type="text/javascript">
var premsAutoCompleteGoogleApiKey = "{{ premsAutoComplete.googleApiKey }}",
premsAutoCompleteDisableButtonOnError = "{{ premsAutoComplete.disableButtonOnError }}",
premsAutoCompleteLanguage = "{{ premsAutoComplete.language }}",
premsAutoCompleteNumberSuggestions = "{{ premsAutoComplete.numberSuggestions }}",
premsAutoCompleteRepositionZipStreet = "{{ premsAutoComplete.repositionZipStreet }}",
premsAutoCompleteFirstLetterUppercase = "{{ premsAutoComplete.firstLetterUppercase }}",
premsAutoCompleteStreetNoUppercaseChange = "{{ premsAutoComplete.streetNoUppercaseChange }}",
premsAutoCompleteCityNoUppercaseChange = "{{ premsAutoComplete.cityNoUppercaseChange }}",
premsAutoCompleteValidateStreetNumber = "{{ premsAutoComplete.validateStreetNumber }}",
premsAutoCompleteValidateStreetNumberMinLength = {{ premsAutoComplete.validateStreetNumberMinLength }},
premsAutoCompleteEverytimeSetZipCityCountry = "{{ premsAutoComplete.everytimeSetZipCityCountry }}",
premsAutoCompleteCityPrediction = "{{ premsAutoComplete.cityPrediction }}",
premsAutoCompleteStreetNumberErrorMsg = "{{ 'prems-auto-complete.error.streetNumber'|trans }}",
premsAutoCompleteStreetErrorMsg = "{{ 'prems-auto-complete.error.street'|trans }}",
premsAutoCompleteStreetOkErrorMsg = "{{ 'prems-auto-complete.error.streetOk'|trans }}",
premsAutoCompleteShowStreetOkLink = "{{ premsAutoComplete.showStreetOkLink }}",
premsAutoCompleteZipErrorMsg = "{{ 'prems-auto-complete.error.zip'|trans }}",
premsAutoCompleteCityErrorMsg = "{{ 'prems-auto-complete.error.city'|trans }}",
premsAutoCompletePhoneValidationRegex = {{ premsAutoComplete.phoneValidationRegex }},
premsAutoCompleteValidatePhone = "{{ premsAutoComplete.validatePhone }}",
premsAutoCompleteValidateAddressExistence = "{{ premsAutoComplete.validateAddressExistence }}",
premsAutoCompleteShowPasswordStrength = "{{ premsAutoComplete.showPasswordStrength }}",
premsAutoCompletePhoneNumberErrorMsg = "{{ 'prems-auto-complete.error.phone'|trans }}",
premsAutoCompleteWidget = "{{ path('frontend.PremsAutoComplete.validateAddressExistence') }}";
{% if premsAutoComplete.consentGoogleAllowed %}
var premsAutoCompleteConsentGoogleAllowed = 1;
{% else %}
var premsAutoCompleteConsentGoogleAllowed = 0;
{% endif %}
{% if config('PremsAutoComplete6.config.restrictValidationToCountries') %}
var premsAutoCompleteRestrictValidationToCountries = {{ config('PremsAutoComplete6.config.restrictValidationToCountries')|json_encode|raw }};
{% else %}
var premsAutoCompleteRestrictValidationToCountries = "";
{% endif %}
</script>
{% if premsAutoComplete.consentGoogleAllowed %}
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key={{ premsAutoComplete.googleApiKey }}&language={{ premsAutoComplete.language }}&libraries=places"></script>
{% endif %}