<section id="banner-section" class="banner-area home-banner">

    <div class="container">

        <?php
            $banner_image = get_theme_mod('banner_image'); 
            $banner_shortcode = get_theme_mod('banner_shortcode', '[Add Form shortcode]');
        ?>
        <div class="mainbanner">
            <div class="row">
                <div class="bann-immg">              
                    <?php  
                        if(!empty($banner_image)){
                            echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($banner_image).'"  />';
                        }else{
                            echo '<img src="'.get_template_directory_uri().'/assets/images/bannerbg.png" />';
                        }
                    ?>
                    <!-- <div class="bann_lay"></div> -->
                    
                </div>
                <div class="b-contentbx">                    
                        <h4><span><?php echo esc_html(get_theme_mod('banner_spanheading')); ?></span><?php echo esc_html(get_theme_mod('banner_heading')); ?></h4>
                        <p><?php echo esc_html(get_theme_mod('banner_description')); ?></p>
                        <div class="b_btn">
                            <a href="<?php echo esc_html(get_theme_mod('banner_btnlink')); ?>">
                                <i class="fa-solid fa-phone"></i>
                                <?php esc_html_e('Contact Us','plumber-man'); ?>
                            </a>
                        </div>
                    </div>
                <!-- <div class="container">   -->
                <div class="m_contbx">  
                    <div class="form">	
                        <?php if (is_plugin_active('contact-form-7/wp-contact-form-7.php')) { ?>
                        <div class="banner-form">  
                            <h2><?php echo esc_html(get_theme_mod('banner_formheading')); ?></h2>
                            <div class="fmsubtitle"><?php echo esc_html(get_theme_mod('banner_formsubheading')); ?></div>
                             
                            <?php if($banner_shortcode){ ?> 
                                <div class="mainform">
                                    <?php echo do_shortcode($banner_shortcode);?>
                                </div>
                            <?php } else {
                                echo '<p class="scerr">' . esc_html__('Add Form Shortcode from customizer.', 'plumber-man') . '</p>';
                            } ?> 
                        </div>
                        <?php } else {
                            echo '<p class="pulgininstallerror">' . wp_kses_post(
                                sprintf(
                                    __('Install and activate the <a href="%s" target="_blank">Contact Form 7 plugin</a> to use the form functionality.', 'plumber-man'),
                                    esc_url('https://wordpress.org/plugins/contact-form-7/')
                                )
                            ) . '</p>';
                        } ?>
                    </div>
                </div>
            </div> 
        </div>
    </div>
</section>


