{#
 # For the full copyright and license information, please view the
 # docs/licenses/LICENSE.txt file that was distributed with this source code.
 #}

{% block carrier_ranges_costs_zone_row %}
<div class="card shadow-none mb-2 js-carrier-zone-row">
  {{ form_widget(form.zoneId) }}
  <div class="card-body p-4">
    <div class="d-flex mb-2 justify-content-between">
      <h2 class="card-title">{{ form_widget(form.zoneName) }}</h2>
      {{ form_widget(form.deleteZone) }}
    </div>
    <div class="container-fluid">
      <div class="row">
        {{ form_widget(form.ranges) }}
        {{ form_rest(form) }}
      </div>
    </div>
  </div>
</div>
{% endblock %}

{% block carrier_ranges_costs_zone_ranges_collection_widget %}
  {% if prototype is defined and not prototype.rendered %}
    {%- set attr = attr|merge({'data-prototype': form_row(prototype), class: ('js-carrier-range-container ' ~ form.vars.attr.class|default(''))|trim}) -%}
  {% endif %}
  {%- if form is rootform -%}
    {{ form_errors(form) }}
  {%- endif -%}
  <table {{ block('widget_container_attributes') }}>
    <thead>
    <tr>
      <th>{{ form.vars.prototype.range.vars.label }}</th>
      <th>{{ form.vars.prototype.price.vars.label }}</th>
    </tr>
    </thead>
    <tbody class="js-carrier-range-container-body">
      {{- block('form_rows') -}}
    </tbody>
    {{- form_rest(form) -}}
  </table>
{% endblock %}

{% block carrier_ranges_costs_zone_range_row %}
  <tr class="js-carrier-range-row">
    <td class="js-carrier-range-name">
      {{ form_widget(form.range) }}
    </td>
    <td>
      {{ form_widget(form.price) }}
    </td>
    {{ form_rest(form) }}
  </tr>
{% endblock %}
