{# LIBRARIES #}
{{ attach_library('ui_patterns/libraries.bs_progress') }}
{{ attach_library('ui_patterns/car_park_data.car_park_data_lib') }}

{% set attributes = attributes|default(create_attribute()) %}
{% set progressClass = progressClass|default('quiet') %}
{% set classes = [
    'progress-bar',
    progressClass,
] %}

{# TEMPLATE #}
<div class="car-park-data">
  <div class="live-occupancy">
      <span>{{ spaceLeft }}</span>
      <span>Spaces left of {{ totalSpace }}</span>
      <span>Last updated today at {{ lastUpdate }}</span>
  </div>
  <div class="progress">
    <div {{ attributes.addClass(classes) }} role="progressbar" style="width: {{ progressValue }}%" aria-valuenow="{{ progressValue }}" aria-valuemin="0" aria-valuemax="100"></div>
  </div>
</div>
