<?php /** @var \IAWP\Plugin_Group[] $plugin_groups */  ?>
<?php /** @var \IAWP\Statistics\Statistic[] $statistics */  ?>
<?php /** @var bool $is_dashboard_widget */  ?>

<div id="quick-stats" data-controller="quick-stats" class="<?php echo \htmlentities(esc_attr($quick_stats_html_class)??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <?php if(!$is_dashboard_widget): ?>
 <?php echo iawp_blade()->run('plugin-group-options', [
 'option_type'   => 'quick_stats',
 'option_name'   => __('Toggle Stats', 'independent-analytics'),
 'option_icon'   => 'visibility',
 'plugin_groups' => $plugin_groups,
 'options'       => $statistics,
 ]); ?>

 <?php endif; ?>

 <?php /* Quick stats */ ?>
 <div class="iawp-stats total-of-<?php echo \htmlentities(esc_attr($total_stats)??'', ENT_QUOTES, 'UTF-8', false); ?>">
 <?php $__currentLoopData = $statistics; $this->addLoop($__currentLoopData);$this->getFirstLoop();
 foreach($__currentLoopData as $statistic): $loop = $this->incrementLoopIndices();  ?>
 <?php if($is_dashboard_widget && !$statistic->is_visible_in_dashboard_widget()): ?>
 <?php continue; ?>
 <?php endif; ?>

 <?php if(!$statistic->is_group_plugin_enabled()): ?>
 <?php continue; ?>
 <?php endif; ?>
 <?php echo iawp_blade()->run('quick-stat', [
 'id'     => $statistic->id(),
 'name'   => $statistic->name(),
 'formatted_value' => $statistic->formatted_value(),
 'formatted_unfiltered_value' => $statistic->formatted_unfiltered_value(),
 'growth' => $statistic->growth(),
 'formatted_growth' => $statistic->formatted_growth(),
 'growth_html_class' => $statistic->growth_html_class(),
 'icon'   => $statistic->icon(),
 'is_visible' => $statistic->is_visible()
 ]); ?>

 <?php endforeach; $this->popLoop(); $loop = $this->getFirstLoop(); ?>
 </div>
</div>