<?php /* NOTE: GENERATED BY GULP !!! */ ?><?php
$b = "flo-block-testimonials-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

$elements_color = flo_data($data, "elements_color");
$background_color = flo_data($data, "background_color");
$testimonial_items_list = flo_data($data, "testimonial_items_list");
$testimonial_title_font = flo_data($data, "testimonial_title_font");
$title_decorative_letter_font = flo_data($data, "title_decorative_letter_font");
$testimonial_text_font = flo_data($data, "testimonial_text_font");
$testimonial_counter = flo_data($data, "testimonial_counter");
$testimonial_counter_font = flo_data($data, "testimonial_counter_font");

$total_testimonials_number = count($testimonial_items_list);
$display_arrows_class = $total_testimonials_number == 1 ? $b."__arrows--hide-arrows" : "";
$run_multiple_testimonials = $total_testimonials_number > 1 ? "flo_testimonials_1" : "";

$crop_desktop_images_class = flo_data($data, "crop_images") == 'crop' ? '' : $b . '__image--no-crop';
$crop_mobile_images_class = flo_data($data, "crop_mobile_images") == 'crop' ? '' : $b . '__mobile-image--no-crop';

?>

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

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

    ".
    flo_render_typography_styles(
    $b__uniq_for_css." ".$b__for_css."__decorative-letter",
    $title_decorative_letter_font
    )
    ."

    ".
    flo_render_typography_styles(
    $b__uniq_for_css." ".$b__for_css."__text",
    $testimonial_text_font
    )
    ."

    ".
    flo_render_typography_styles(
    $b__uniq_for_css." ".$b__for_css."__testimonial-counter",
    $testimonial_counter_font
    )
    ."

    ".$b__uniq_for_css." {
      color: ".$elements_color.";
      background-color: ".$background_color.";
    }
    ".$b__uniq_for_css." ".$b__for_css."__number-divider {
      background-color: ".$elements_color.";
    }

  "
], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->startSection('block_content'); ?>
  <div class="<?php echo $b; ?> <?php echo $b__uniq; ?>">
    <div class="<?php echo $b; ?>__testimonials-slider <?php echo $crop_desktop_images_class; ?> <?php echo $crop_mobile_images_class; ?>">
      <?php foreach($testimonial_items_list as $item_number => $testimonial_item): ?>
        <?php
          $testimonial_count = count($testimonial_items_list);

          $testimonial_image = flo_data($testimonial_item, "testimonial_image");
          $testimonial_image_src = flo_aq($url = $testimonial_image['url'], $width = '99999', $height = '960', $crop = false, $force_sizes = true);
          $testimonial_title = flo_data($testimonial_item, "testimonial_title");
          $title_decorative_letter = flo_data($testimonial_item, "title_decorative_letter");
          $testimonial_text = flo_data($testimonial_item, "testimonial_text");

          $srcset_sizes = [
           'mobile' => array('width' => 540, 'height' => 600),  // mobile size
           'tablet' => array('width' => 432, 'height' => 646), // tablet size
           'desktop' => array('width' => 644, 'height' => 964),
          ];

          $image_srcset = generate_srcsets($testimonial_image['url'], $srcset_sizes, $crop = true);
        ?>
        <div class="<?php echo $b; ?>__testimonial-slide">
          <div class="<?php echo $b; ?>__testimonial-slide-content">
            <?php if($testimonial_count < 2): ?>
            <img class="<?php echo $b; ?>__testimonial-image"
              src="<?php echo $testimonial_image_src; ?>"
              srcset="<?php echo $image_srcset['srcsets']; ?>"
              alt="<?php echo $testimonial_image['alt']; ?>"
              sizes ="<?php echo $image_srcset['sizes']; ?>">
            <?php else: ?>
            <img class="<?php echo $b; ?>__testimonial-image"
              data-src="<?php echo $testimonial_image_src; ?>"
              data-srcset="<?php echo $image_srcset['srcsets']; ?>"
              alt="<?php echo $testimonial_image['alt']; ?>"
              sizes ="<?php echo $image_srcset['sizes']; ?>">
            <?php endif; ?>
            <div class="<?php echo $b; ?>__testimonial-text-area">
              <?php if($title_decorative_letter): ?>
                <div class="<?php echo $b; ?>__decorative-letter"><?php echo $title_decorative_letter; ?></div>
              <?php endif; ?>
              <?php if($testimonial_title): ?>
                <h2 class="<?php echo $b; ?>__title"><?php echo $testimonial_title; ?></h2>
              <?php endif; ?>
              <?php if($testimonial_text): ?>
                <div class="<?php echo $b; ?>__text"><?php echo $testimonial_text; ?></div>
              <?php endif; ?>
              <?php if($testimonial_counter): ?>
                <div class="<?php echo $b; ?>__testimonial-counter">
                  <div class="<?php echo $b; ?>__current-item-number">
                    <?php if($item_number < 9): ?>
                      0<?php echo $item_number + 1; ?>

                    <?php else: ?>
                      <?php echo $item_number + 1; ?>

                    <?php endif; ?>
                  </div>
                  <div class="<?php echo $b; ?>__number-divider"></div>
                  <div class="<?php echo $b; ?>__total-item-number">
                    <?php if($testimonial_count < 10): ?>
                      0<?php echo $total_testimonials_number; ?>

                    <?php else: ?>
                      <?php echo $total_testimonials_number; ?>

                    <?php endif; ?>
                  </div>
                </div>
              <?php endif; ?>
            </div>
          </div>
        </div>
      <?php endforeach; ?>
    </div>
    <div class="<?php echo $b; ?>__arrows <?php echo $display_arrows_class; ?>">
      <i class="<?php echo $b; ?>__arrow <?php echo $b; ?>__arrow--left flo-icon-line-arrow-left <?php echo $b; ?>__slide-previous"></i>
      <i class="<?php echo $b; ?>__arrow <?php echo $b; ?>__arrow--right flo-icon-line-arrow-right <?php echo $b; ?>__slide-next"></i>
    </div>
  </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" => $run_multiple_testimonials // 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(); ?>