{% comment %}
  Renders a countdown-style1 expired time

  Accepts:
  - title: {String} Title of countdown offer
  - subtitle: {String} Subtitle of countdown offer
  - time: {String} Expired offer time
  - show_days: {Boolean} Show countdown days
  - show_hours: {Boolean} Show countdown hours
  - show_minutes: {Boolean} Show countdown minutes
  - show_seconds: {Boolean} Show countdown seconds
{% endcomment %}

<xo-animate xo-cascade>
  {% assign timestamp = time | date: '%s' | append: '000' %}
  <xo-countdown xo-timestamp='{{timestamp}}' class='countdown-style1'>
    <div class='countdown-style1__time'>
      {% if show_days %}
        <div class='countdown-style1__circle'>
          <xo-countdown-day></xo-countdown-day>
          <span>Days</span>
        </div>
      {% endif %}
      {% if show_hours %}
        <div class='countdown-style1__circle'>
          <xo-countdown-hour></xo-countdown-hour>
          <span>Hours</span>
        </div>
      {% endif %}
      {% if show_minutes %}
        <div class='countdown-style1__circle'>
          <xo-countdown-minute></xo-countdown-minute>
          <span>Mins</span>
        </div>
      {% endif %}
      {% if show_seconds %}
        <div class='countdown-style1__circle'>
          <xo-countdown-second></xo-countdown-second>
          <span>Sec</span>
        </div>
      {% endif %}
    </div>
    <div class='countdown-style1__expired'>
      <div class='countdown-style1__block'>
        {% if show_days %}
          <div class='countdown-style1__circle'>
            <xo-countdown-day>00</xo-countdown-day>
            <span>Days</span>
          </div>
        {% endif %}
        {% if show_hours %}
          <div class='countdown-style1__circle'>
            <xo-countdown-hour>00</xo-countdown-hour>
            <span>Hours</span>
          </div>
        {% endif %}
        {% if show_minutes %}
          <div class='countdown-style1__circle'>
            <xo-countdown-minute>00</xo-countdown-minute>
            <span>Mins</span>
          </div>
        {% endif %}
        {% if show_seconds %}
          <div class='countdown-style1__circle'>
            <xo-countdown-second>00</xo-countdown-second>
            <span>Sec</span>
          </div>
        {% endif %}
      </div>
    </div>
  </xo-countdown>
</xo-animate>
