<?php /* NOTE: GENERATED BY GULP !!! */ ?><?php
$b = "flo-block-image-block-1"; // To be used inside HTML

// Start: Class name automation
  $b__for_css = ".".$b; // To be used inside CSS
  $b__uniq = $b."--".mt_rand(1, 999); // To be used inside HTML
  $b__uniq_for_css = ".".$b__uniq; // To be used inside CSS
// End: Class name automation

/* START: ACF Fields */
$elements_color = flo_data($data, "elements_color");
$image = flo_data($data, "image");
$image_position = flo_data($data, "image_position");
$title = flo_data($data, "title");
$title_font = flo_data($data, "title_font");
$title_paragraph = flo_data($data, "title_paragraph");
$title_paragraph_font = flo_data($data, "title_paragraph_font");
$button = flo_data($data, "button");
$button_label_font = flo_data($data, "button_label_font");
$button_border_color = flo_data($data, "button_border_color");
$button_label_color_on_hover = flo_data($data, "button_label_color_on_hover");
$button_background_color_on_hover = flo_data($data, "button_background_color_on_hover");

$image_position_modifier = $image_position == "left" ? $b ."--left-aligned" :  $b . "--right-aligned";
/* END: ACF Fields */

/* START Image srcsets */
$image_url = $image['url'];
$image_id = $image['ID'];

$image_width_854 = flo_aq($url = $image_url, $width = 854, $height = 1080, $crop = true, $force_sizes = true);
$image_width_640 = flo_aq($url = $image_url, $width = 640, $height = 1080, $crop = false, $force_sizes = true);
$img_srcset = wp_get_attachment_image_srcset($image_id,'full');
$img_srcset .= ','.$image_width_854.' 854w';
$img_srcset .= ','.$image_width_640.' 640w';

/* END Image srcsets */

?>

<?php echo $__env->make('core.style', [
  "breakpoint__general" => "

    ".
    flo_render_typography_styles(
    $b__uniq_for_css." ".$b__for_css."__title",
    $title_font
    )
    ."

    ".
    flo_render_typography_styles(
    $b__uniq_for_css." ".$b__for_css."__title-paragraph",
    $title_paragraph_font
    )
    ."

    ".
    flo_render_typography_styles(
    $b__uniq_for_css." ".$b__for_css."__button",
    $button_label_font
    )
    ."

    ".$b__uniq_for_css." {
      color: ".$elements_color.";
      border-color: ".$button_border_color.";
    }
    ".$b__uniq_for_css." ".$b__for_css."__button:hover {
      color: ".$button_label_color_on_hover.";
      background-color: ".$button_background_color_on_hover.";
      // border-color: ".$button_background_color_on_hover.";
    }

  "
], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->startSection('block_content'); ?>
  <div class="<?php echo $b; ?> <?php echo $b__uniq; ?> <?php echo $image_position_modifier; ?>">
    <?php if($image): ?>
      <?php /* <div class="<?php echo $b; ?>__image" style="background-image:url(<?php echo $image; ?>);"></div> */ ?>
      <div class="<?php echo $b; ?>__image-wrap">
        <img class="<?php echo $b; ?>__image" src=<?php echo $image_url; ?> srcset="<?php echo $img_srcset; ?>" alt="<?php echo $image['alt']; ?>" sizes="(max-width: 768px) 100vw, (max-width: 1440px) 50vw" />
      </div>
    <?php endif; ?>
    <?php if($title or $title_paragraph or $button): ?>
      <div class="<?php echo $b; ?>__text-area">
        <?php if($title): ?>
          <h2 class="<?php echo $b; ?>__title"><?php echo $title; ?></h2>
        <?php endif; ?>
        <?php if($title_paragraph): ?>
          <div class="<?php echo $b; ?>__title-paragraph"><?php echo $title_paragraph; ?></div>
        <?php endif; ?>
        <?php if($button): ?>
          <div class="<?php echo $b; ?>__button-wrap">
            <a href="<?php echo $button['url']; ?>" class="<?php echo $b; ?>__button" target="<?php echo $button['target']; ?>"><?php echo $button['title']; ?></a>
          </div>
        <?php endif; ?>
      </div>
    <?php endif; ?>
  </div>
<?php $__env->stopSection(true); ?>

<?php echo $__env->make('layout.block', [
  "block_classes" => "", // Will be added to main block div. e.g. flo-block--full-width
  // "data_onready" => "block_name" // Specify a function (see _blank.js on how to define) that will be executed on document ready.
], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>