<?php
$images = mb_get_block_field("component_image");
// image sizes
$size_d = mb_get_block_field("component_image_size_d");
$s_d = empty($size_d) ? "s-12" : $size_d;
$size_tb = mb_get_block_field("component_image_size_tb");
$s_tb = empty($size_tb) ? "s-6" : $size_tb;
$size_mb = mb_get_block_field("component_image_size_mb");
$s_mb = empty($size_mb) ? "s-4" : $size_mb;
// image settings
$width = mb_get_block_field("component_image_width");
$align = mb_get_block_field("component_image_align");
$br = mb_get_block_field("component_image_br");

if ($images) { ?>
<section <?= inoby_block_attrs($attributes, ["class" => "image-component"]) ?>>
  <div class="container">
    <div class="row" style="<?= $align ?>">
      <div class="col-<?= $width ?? "12" ?> col-md-12 image-wrap">
        <?php echo mb_inoby_picture($images, $s_d, ["sm" => $s_mb, "md" => $s_tb, "lg" => $s_d], $br); ?>
      </div>
    </div>
  </div>
</section>
<?php }
