<?php
/**
 * Countdown - Template
 * 
 * @package OrokuBlocks
 * @author OrokuBlocks (https://orokublocks.com/)
 * 
 * @since 1.0.0
 * 
 * @param array $args {
 *   @type string $align                        Countdown alignment. One of: 'center', 'left'. Default: 'center'.
 *   @type string $days_text                    Countdown days text.
 *   @type string $hours_text                   Countdown hours text.
 *   @type string $minutes_text                 Countdown minutes text.
 *   @type string $seconds_text                 Countdown seconds text.
 * }
 */

// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
  exit;
}

$defaults = [
  'align'         => 'center',
  'days_text'     => 'Days',
  'hours_text'    => 'Hours',
  'minutes_text'  => 'Mins',
  'seconds_text'  => 'Secs'
];

$options = array_merge( $defaults, $args );

?>
<div class="xm-countdown orokublocks-countdown orokublocks-countdown--align--<?php echo esc_attr( $options['align'] ); ?>">
  <div class="orokublocks-countdown__item">
    <p class="orokublocks-countdown__title xm-countdown__days">-</p>
    <p class="orokublocks-countdown__text"><?php echo esc_html( $options['days_text'] ); ?></p>
  </div>

    <div class="orokublocks-countdown__item">
    <p class="orokublocks-countdown__title xm-countdown__hours">-</p>
    <p class="orokublocks-countdown__text"><?php echo esc_html( $options['hours_text'] ); ?></p>
  </div>

  <div class="orokublocks-countdown__item">
    <p class="orokublocks-countdown__title xm-countdown__minutes">-</p>
    <p class="orokublocks-countdown__text"><?php echo esc_html( $options['minutes_text'] ); ?></p>
  </div>

  <div class="orokublocks-countdown__item">
    <p class="orokublocks-countdown__title xm-countdown__seconds">-</p>
    <p class="orokublocks-countdown__text"><?php echo esc_html( $options['seconds_text'] ); ?></p>
  </div>
</div>
