{#
/**
 * @file
 * OpenY Schedules Class.
 *
 * Available variables:
 * - title: provides title.
 * - content: contains all data.
 *
 * @ingroup themeable
 */
#}
<div class="container">
  <div class="row">
    <div class="schedule-sessions-group w-100">

    <a href="#" class="week-control prev-week btn btn-primary"><i class="fas fa-arrow-left"></i> {{ 'Previous week' }}</a>
    <a href="#" class="week-control next-week btn btn-primary">{{ 'Next week' }} <i class="fas fa-arrow-right"></i></a>
    <div class="clearfix"></div>

    <h2 class="mt-5">{{ title }}</h2>

    {% if content is empty %}
      {{ 'It looks like there are no classes / sessions matching your search criteria.'|t }}
    {% endif %}

    {% for time, group in content %}
        <h6 class="group_time group_time_week d-flex align-items-center p-2">
          <span class="m-auto">{{ time }}</span>
        </h6>

        <ul class="time-wrapper list-unstyled">
        {% for teaser in group %}
          <li>
            <div class="row">

              {# title #}
              <div class="col-md">
                <h4 class="title-class text-uppercase font-weight-bold">
                  <a href="{{ teaser.url }}" target="_blank">
                    {{ teaser.label }}
                  </a>
                </h4>

                <div class="time font-weight-bold">{{ teaser.time }}</div>
              </div>

              {# badges #}
              {% if teaser.included_in_membership or teaser.ticket_required %}
              <div class="col-md text-left text-md-right">
                {% if teaser.included_in_membership %}
                  <div class="py-2 px-3 badge badge-pill badge-success mb-2">
                    <i class="far fa-check-square"></i> {{ 'Included in Membership'|t }}
                  </div>
                {% endif %}

                {% if teaser.ticket_required %}
                  <div class="py-2 px-3 badge badge-pill badge-warning ml-sm-2">
                    <i class="fas fa-ticket-alt"></i> {{ 'Ticket Required'|t }}
                  </div>
                {% endif %}
              </div>
              {% endif %}

            </div>

            <p class="mt-4">{{ teaser.description }}</p>

          </li>
        {% endfor %}
        </ul>
      {% endfor %}


    </div>
  </div>
</div>
