<h1>{{ heading_title }}</h1>
<h3>{{ text_location }}</h3>
<div class="card mb-3">
  <div class="card-body">
    <div class="row">
      {% if image %}
        <div class="col-sm-3"><img src="{{ image }}" alt="{{ store }}" title="{{ store }}" class="img-thumbnail" style="width: 268px"/></div>
      {% endif %}
      <div class="col-sm-3"><strong>{{ store }}</strong>
        <br/>
        <address>
          {{ address }}
        </address>
        <a href="{{ map }}" target="_blank" class="btn btn-outline-secondary"><i class="fa-solid fa-location-dot"></i> {{ button_map }}</a>
      </div>
      {% if telephone %}
        <div class="col-sm-3"><strong>{{ text_telephone }}</strong>
          <br/>
          {{ telephone }}
          <br/>
          <br/>
        </div>
      {% endif %}
      <div class="col-sm-3">
        {% if open %}
          <strong>{{ text_open }}</strong>
          <br/>
          {{ open }}
          <br/>
          <br/>
        {% endif %}
        {% if comment %}
          <strong>{{ text_comment }}</strong>
          <br/>
          {{ comment }}
        {% endif %}
      </div>
    </div>
  </div>
</div>
{% if locations %}
  <h3>{{ text_store }}</h3>
  <div id="accordion" class="accordion mb-3">
    {% for location in locations %}
      <div class="accordion-item">
        <h2 class="accordion-header">
          <button type="button" class="accordion-button" data-bs-toggle="collapse" data-bs-target="#collapse-location-{{ location.location_id }}">{{ location.name }}</button>
        </h2>
        <div id="collapse-location-{{ location.location_id }}" class="accordion-collapse collapse" data-bs-parent="#accordion">
          <div class="accordion-body">
            <div class="row">
              {% if location.image %}
                <div class="col-sm-3"><img src="{{ location.image }}" alt="{{ location.name }}" title="{{ location.name }}" class="img-thumbnail" style="width: 268px"/></div>
              {% endif %}
              <div class="col-sm-3"><strong>{{ location.name }}</strong>
                <br/>
                <address>
                  {{ location.address }}
                </address>
                <a href="{{ location.map }}" target="_blank" class="btn btn-outline-secondary"><i class="fa-solid fa-location-dot"></i> {{ button_map }}</a>
              </div>
              <div class="col-sm-3"><strong>{{ text_telephone }}</strong>
                <br/>
                {{ location.telephone }}
                <br/>
                <br/>
              </div>
              <div class="col-sm-3">
                {% if location.open %}
                  <strong>{{ text_open }}</strong>
                  <br/>
                  {{ location.open }}
                  <br/>
                {% endif %}
                {% if location.comment %}
                  {{ location.comment }}
                {% endif %}
              </div>
            </div>
          </div>
        </div>
      </div>
    {% endfor %}
  </div>
{% endif %}
<form id="form-contact" action="{{ send }}" data-on="submit:onSubmit">
  <fieldset>
    <legend>{{ text_contact }}</legend>
    <div class="row mb-3">
      <label for="input-name" class="col-sm-2 col-form-label">{{ entry_name }}</label>
      <div class="col-sm-10">
        <input type="text" name="name" value="{{ name }}" id="input-name" class="form-control" required/>
        <div id="error-name" class="invalid-feedback"></div>
      </div>
    </div>
    <div class="row mb-3">
      <label for="input-email" class="col-sm-2 col-form-label">{{ entry_email }}</label>
      <div class="col-sm-10">
        <input type="text" name="email" value="{{ email }}" id="input-email" class="form-control" required/>
        <div id="error-email" class="invalid-feedback"></div>
      </div>
    </div>
    <div class="row mb-3">
      <label for="input-enquiry" class="col-sm-2 col-form-label">{{ entry_enquiry }}</label>
      <div class="col-sm-10">
        <textarea name="enquiry" rows="10" id="input-enquiry" class="form-control" required></textarea>
        <div id="error-enquiry" class="invalid-feedback"></div>
      </div>
    </div>
    {{ captcha }}
  </fieldset>
  <div class="text-end">
    <button type="submit" class="btn btn-primary">{{ button_submit }}</button>
  </div>
</form>