<?php
$columns = mb_get_block_field("statistics-columns");

$statistics = mb_get_block_field("statistics");

if ($columns) { ?>
<section <?= inoby_block_attrs($attributes, ["class" => "statistics"]) ?>>
  <div class="container">
    <div class="row">
      <div class="col-12">
        <div class="statistics-wrap g-col-sm-1 g-col-<?= $columns ?>">
          <?php foreach ($statistics as $contact_item): ?>
          <div class="statistic-box">
            <?php
              echo isset($contact_item["headline"]) ? "<h2>" . $contact_item["headline"] . "</h2>" : "";
              echo isset($contact_item["text"]) ? "<p>" . $contact_item["text"] . "</p>" : "";
            ?>
          </div>
          <?php endforeach; ?>
        </div>
      </div>
    </div>
  </div>
</section>
<?php }