<?php
/**
 * Metrics - Template
 * 
 * @package OrokuBlocks
 * @author OrokuBlocks (https://orokublocks.com/)
 * 
 * @since 1.0.0
 * 
 * @param array $args {
 *   @type array  $metrics                                  {
 *     @type string $title         Metric title.
 *     @type string $text          Metric text.
 *   }
 *   @type string $align                                    Countdown alignment. One of: 'center', 'left'. Default: 'center'.
 * }
 */

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

$defaults = [
  'align' => 'center'
];

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

?>
<div class="orokublocks-metrics orokublocks-metrics--align--<?php echo esc_attr( $options['align'] ); ?>">
<?php foreach ( $options['metrics'] as $metric ) : ?>
  <div class="orokublocks-metric">
    <p class="orokublocks-card__title"><?php echo esc_html( $metric['text'] ); ?></p>
    <p class="orokublocks-card__text orokublocks-card__text--size--small"><?php echo esc_html( $metric['title'] ); ?></p>
  </div>
<?php endforeach; ?>
</div>
