{#**
 * Copyright since 2025 InPost S.A.
 *
 * For the full license information, please view the LICENSE file bundled with the module.
 *
 * @author InPost S.A.
 * @copyright since 2025 InPost S.A.
 * @license MIT
 *#}
{% extends '@Modules/inpostinternational/views/templates/admin/layout/config_page.html.twig' %}

{% form_theme form '@Modules/inpostinternational/views/templates/admin/form_theme/horizontal_layout.html.twig' %}

{% block content %}
  <div class="row justify-content-center">
    <div class="col">

      <div class="card">
        {{ form_start(form) }}
        <h3 class="card-header">
          <i class="material-icons">settings</i> {{ layoutTitle }}
        </h3>

        <div class="card-body card-block row">
          <div class="form-wrapper card-text">
            {{ form_errors(form) }}

            {{ form_row(form.closestPointSerachMode) }}

            <div class="js-inpost-intl-geocoder-options-wrapper">
              {% if form.geocoderConfig is defined %}
                {{ form_row(form.geocoderConfig) }}
              {% endif %}
            </div>

            {{ form_rest(form) }}
          </div>
        </div>

        <div class="card-footer clearfix">
          <button class="btn btn-primary float-right"{% if not can_update %} disabled{% endif %}>{{ 'Save'|trans({}, 'Admin.Actions') }}</button>
        </div>
        {{ form_end(form) }}
      </div>

    </div>
  </div>
{% endblock %}

{% block javascripts %}
  {{ parent() }}

  <script type="text/javascript" src="{{ asset('js/admin/config/checkout.js', 'InPostInternational') }}"></script>
{% endblock %}
