<?php
/**
 * Banner Section
 * 
 * @package fresh_bakers_shop
 */
$fresh_bakers_shop_slider = get_theme_mod( 'fresh_bakers_shop_slider_setting',false );
$fresh_bakers_shop_slider_button_url  = get_theme_mod( 'fresh_bakers_shop_slider_btn_url' );
$fresh_bakers_shop_slider_button_text = get_theme_mod( 'fresh_bakers_shop_button_text', __( 'Order Now', 'fresh-bakers-shop' ) );
$fresh_bakers_shop_slider_button_url_2  = get_theme_mod( 'fresh_bakers_shop_slider_btn_url_2' );
$fresh_bakers_shop_slider_button_text_2 = get_theme_mod( 'fresh_bakers_shop_button_text_2', __( 'Visit Our Store', 'fresh-bakers-shop' ) );
$fresh_bakers_shop_phone = get_theme_mod( 'fresh_bakers_shop_header_phone' );
$fresh_bakers_shop_phone = get_theme_mod( 'fresh_bakers_shop_header_phone' );
?>
<?php if ( $fresh_bakers_shop_slider ){?>
    <div class="banner wow fadeInDown" data-wow-duration="1.5s">
      <div class="banner_box">
        <div class="container">
        <div class="row">
          <div class="col-lg-5 col-md-12 align-self-center banner-info">
            <?php 
              $fresh_bakers_shop_heading = get_theme_mod('fresh_bakers_shop_slider_heading');
              if ( $fresh_bakers_shop_heading ) : ?>
                <h2>
                  <?php echo esc_html($fresh_bakers_shop_heading); ?>
                </h2>
            <?php endif; ?>
              <?php if ( get_theme_mod('fresh_bakers_shop_slider_content') ) : ?>
                  <p class="slide-extra-content"><?php echo esc_html(get_theme_mod('fresh_bakers_shop_slider_content')); ?></p>
              <?php endif; ?>
              <div class="banner-buttons">
                <div class="slide-btn-green">
                  <?php if ($fresh_bakers_shop_slider_button_text ) : ?>
                    <a href="<?php echo esc_url( $fresh_bakers_shop_slider_button_url ); ?>">                   
                      <i class="fa-solid fa-cake-candles"></i>
                      <?php echo esc_html( $fresh_bakers_shop_slider_button_text ); ?>
                    </a>
                  <?php endif; ?>
                </div>
                <div class="slide-btn-green-1">
                  <?php if ($fresh_bakers_shop_slider_button_text_2 ) : ?>
                    <a href="<?php echo esc_url( $fresh_bakers_shop_slider_button_url_2 ); ?>">
                      <?php echo esc_html( $fresh_bakers_shop_slider_button_text_2 ); ?>
                    </a>
                  <?php endif; ?>
                </div>
              </div>
          </div>
          <div class="col-lg-7 col-md-12 align-self-end">
            <div class="imagebox">
                <div class="first-image">
                  <div class="banner-image-first">
                    <?php if ( get_theme_mod('fresh_bakers_shop_slider_image_1') ) : ?>
                      <img src="<?php echo esc_url(get_theme_mod('fresh_bakers_shop_slider_image_1'));?>">
                    <?php else: ?>
                      <div>
                        <img src="<?php echo get_stylesheet_directory_uri() . '/images/image1.png'; ?>">
                      </div>
                    <?php endif; ?>
                  </div>

                  <div class="rating-info">
                    <div class="post-reviews">
                      <?php echo do_shortcode( '[kkstarratings]' );?>
                    </div>	
                    <div class="rating-text">
                      <p class="average"><?php echo esc_html__( 'Average', 'fresh-bakers-shop' ); ?></p>
                      <p class="rating"><?php echo esc_html__( 'Google Rating', 'fresh-bakers-shop' ); ?></p>
                    </div>
                  </div>
                </div>
                <div class="banner-img">
                  <?php if ( get_theme_mod('fresh_bakers_shop_slider_image') ) : ?>
                    <img src="<?php echo esc_url(get_theme_mod('fresh_bakers_shop_slider_image'));?>">
                  <?php else: ?>
                    <div>
                      <img src="<?php echo get_stylesheet_directory_uri() . '/images/default.png'; ?>">
                    </div>
                  <?php endif; ?>
                </div>
                <div class="priceinfo">
                  <?php if ( get_theme_mod('fresh_bakers_shop_price') ) : ?>
                      <p class="price-text"><?php echo esc_html__( 'STARTING', 'fresh-bakers-shop' ); ?></p>                                              
                      <p class="price">
                        <?php echo esc_html__( '$', 'fresh-bakers-shop' ); ?><?php echo esc_html(get_theme_mod('fresh_bakers_shop_price')); ?>
                      </p>
                  <?php endif; ?>
                </div>
                <div class="second-image">
                  <div class="discount-info">
                    <?php if ( get_theme_mod('fresh_bakers_shop_discount_text') ) : ?>
                        <h6 class="discount-text"><?php echo esc_html(get_theme_mod('fresh_bakers_shop_discount_text')); ?></h6>
                    <?php endif; ?>
                    <div class="discount-count">
                      <?php if ( get_theme_mod('fresh_bakers_shop_discount') ) : ?>
                          <h3 class="discount"><?php echo esc_html(get_theme_mod('fresh_bakers_shop_discount')); ?><?php echo esc_html__( '% Off', 'fresh-bakers-shop' ); ?>
                          </h3>                         
                      <?php endif; ?>
                      <i class="fa-solid fa-arrow-right-long"></i>
                    </div>
                  </div>

                  <div class="banner-image-second">
                    <?php if ( get_theme_mod('fresh_bakers_shop_slider_image_2') ) : ?>
                      <img src="<?php echo esc_url(get_theme_mod('fresh_bakers_shop_slider_image_2'));?>">
                    <?php else: ?>
                      <div>
                        <img src="<?php echo get_stylesheet_directory_uri() . '/images/image2.png'; ?>">
                      </div>
                    <?php endif; ?>
                  </div>
                </div>
                <div class="phone-info">
                  <div class="icon-phone">
                      <i class="<?php echo esc_attr(get_theme_mod('fresh_bakers_shop_phone_icon', 'fas fa-phone-volume')); ?>"></i>
                  </div>
                  <div class="number">
                    <p class="phone-text"><?php echo esc_html__( 'Booking? Call Us', 'fresh-bakers-shop' ); ?></p>
                    <?php if ( $fresh_bakers_shop_phone ) : ?>
                        <a href="tel:<?php echo esc_attr($fresh_bakers_shop_phone); ?>" class="phone-num">
                            <?php echo esc_html($fresh_bakers_shop_phone); ?>
                        </a>
                    <?php endif; ?>
                  </div>
                </div>
            </div>
          </div>
        </div>
        </div>
      </div>
    </div>
  </div>
<?php } ?>