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

$form_title = flo_data($data, "form_title");
$form_title_font = flo_data($data, "form_title_font");
$form_subtitle = flo_data($data, "form_subtitle");
$form_subtitle_font = flo_data($data, "form_subtitle_font");
$name_field_label = flo_data($data, "name_field_label");
$second_name_field_label = flo_data($data, "second_name_field_label");
$email_field_label = flo_data($data, "email_field_label");
$date_field_label = flo_data($data, "date_field_label");
$message_field_label = flo_data($data, "message_field_label");
$submit_button_label = flo_data($data, "submit_button_label");
$submit_button_label_font = flo_data($data, "submit_button_label_font");
$submit_button_label_color = flo_data($data, "submit_button_label_color");
$submit_button_background_color = flo_data($data, "submit_button_background_color","#555049");
$contact_form_labels_font = flo_data($data, "contact_form_labels_font");

$form_type = flo_data($data, "contact_form_type");
$contact_form_shortcode = flo_data($data, "contact_form_shortcode");
$contact_form_email = flo_data($data, "your_email");
$use_reply_to_header = flo_data($data, "use_reply_to_header");
$custom_thank_you_message = flo_data($data, "custom_thank_you_message");

// workaround to ensure compatibility with the core code:
flo_set_contact_form_email($data, $data_email_field = 'your_email', $data_reply_header_field ='use_reply_to_header', $post_id = $post->ID);

?>

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

      ".
      flo_render_typography_styles(
      $b__uniq_for_css." ".$b__for_css."__form-title",
      $form_title_font
      )
      ."

      ".
      flo_render_typography_styles(
      $b__uniq_for_css." ".$b__for_css."__form-subtitle",
      $form_subtitle_font
      )
      ."

      ".
      flo_render_typography_styles(
      $b__uniq_for_css." ".$b__for_css."__form-field",
      $contact_form_labels_font
      )
      ."

      ".
      flo_render_typography_styles(
      $b__uniq_for_css." ".$b__for_css."__form-submit",
      $submit_button_label_font
      )
      ."

      ".$b__uniq_for_css." {
        color: ".$elements_color.";
      }

      /* Set Color for Input Fields */
      ".$b__uniq_for_css." input:not([type='submit']),
      ".$b__uniq_for_css." textarea {
        color: ".$elements_color.";
        border-bottom: 1px solid ".hex2rgba($elements_color, 0.3)."!important;
      }

      /* Set Color and Background-color for Submit Button */
      ".$b__uniq_for_css." ".$b__for_css."__form-submit {
        color: ".$submit_button_label_color."!important;
        background-color: ".$submit_button_background_color.";
      }

      /* Set Color and Background-color for Submit Button ON HOVER */
      ".$b__uniq_for_css." ".$b__for_css."__form-submit:hover {
        color: ".$submit_button_background_color."!important;
        background-color: ".$submit_button_label_color."!important;
      }

      ".$b__for_css."__response p {
        color: ".$elements_color."!important;
        border-color:".$elements_color.";
      }

  ",
  "breakpoint__medium_up" => "
  "
], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->startSection('block_content'); ?>
  <div class="<?php echo $b; ?> <?php echo $b__uniq; ?>">

    <?php if($form_type == 'builtin'): ?>
      <div class="<?php echo $b; ?>__form-wrap">
        <div class="flo-modal" style="display: none;">
            <div class="thx-msg">
              <div class="flo-icon__close"></div>
              <div class="content"><?php echo flo_data($data,'custom_thank_you_message'); ?></div>  <!--  use the correct field name here -->
            </div>
        </div>

        <form class="<?php echo $b; ?>__form-section flo-form__built-in"> <!-- flo-form__built-in is required class -->

          <?php if($form_title): ?>
            <h2 class="<?php echo $b; ?>__form-title">
              <?php echo $form_title; ?>

            </h2>
          <?php endif; ?>
          <?php if($form_subtitle): ?>
            <h3 class="<?php echo $b; ?>__form-subtitle">
              <?php echo $form_subtitle; ?>

            </h3>
          <?php endif; ?>

          <div class="<?php echo $b; ?>__fields-wrap">
              <div class="<?php echo $b; ?>__form-field <?php echo $b; ?>__form-field--half-width">
                <input id="name" class="flo-name" type="text" name="flo-name" value="" placeholder="<?php echo $name_field_label; ?>">
              </div>
              <div class="<?php echo $b; ?>__form-field <?php echo $b; ?>__form-field--half-width">
                <input id="email" class="flo-email" type="text" name="flo-email" value="" placeholder="<?php echo $email_field_label; ?>">
              </div>
            <div class="<?php echo $b; ?>__form-field">
              <textarea id="message" class="" name="flo-message" placeholder="<?php echo $message_field_label; ?>"></textarea>
            </div>
          </div>
          <input type="hidden" value="<?php echo $post->ID; ?>" name="pid"> <!-- required -->
          <div class="<?php echo $b; ?>__response contact-response"></div>  <!-- required -->
          <div class="clearfix"></div>
          <button class="<?php echo $b; ?>__form-submit flo-button flo-form-submit"><?php echo $submit_button_label; ?></button> <!-- should use class flo-form-submit -->
        </form>
      </div>
    <?php else: ?>
      <div class="<?php echo $b; ?>__form-wrap">
        <div class="<?php echo $b; ?>__form-section <?php echo $b; ?>__form-section--custom">
          <?php if($form_title): ?>
            <h2 class="<?php echo $b; ?>__form-title">
              <?php echo $form_title; ?>

            </h2>
          <?php endif; ?>
          <?php if($form_subtitle): ?>
            <h3 class="<?php echo $b; ?>__form-subtitle">
              <?php echo $form_subtitle; ?>

            </h3>
          <?php endif; ?>

          <?php
          /*=========================================================
          =  Suport for the Flo Forms plugin shortcode               =
          =========================================================*/

            // $running_flo_shortcode is necessary for the Flo Forms plugin
            // it tells the plugin that the shortcode is being used and then the plugin loads the js and css files
            global $running_flo_shortcode;
            $running_flo_shortcode = true;

          /*=====  End of Suport for the Flo FOrms plugin hortcode  ======*/
          
            $form_shortcode = trim(flo_data($data,'contact_form_shortcode'));

           echo do_shortcode( $form_shortcode );
          ?>
        </div>
      </div>
    <?php endif; ?>
  </div>
<?php $__env->stopSection(true); ?>

<?php echo $__env->make('layout.block', [
  "block_classes" => "flo-block--full-width disable-appear", // Will be added to main block div. e.g. flo-block--full-width
  // "data_onready" => "flo_block_contact_block_2" // 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(); ?>