<?php
    $is_form = (class_exists('WPCF7') && !empty($settings['form_id'])) || false;
    $heading = !empty($settings['heading']) ? $settings['heading'] : 'Add Heading Here';
    $desc = !empty($settings['desc']) ? $settings['desc'] : 'Add Description Here';
    $is_heading = !empty($settings['is_show_heading']) || false;
    $is_desc = !empty($settings['is_show_desc']) || false;
    $is_loader = !empty($settings['show_loader']) || false;
?>
    <div class="pxl-contact-form <?php echo esc_attr($settings['pxl_animate'].' '.$settings['styles']); ?>" data-wow-delay="<?php echo esc_attr($settings['pxl_animate_delay']); ?>ms">
        <div class="pxl-item--container">
            <div class="pxl-item--inner">
                <?php if($is_heading): ?>
                    <h6 class="pxl-item--heading">
                        <span class="pxl-heading--text">
                            <?php echo esc_attr($heading); ?>
                        </span>
                    </h6>
                <?php endif; ?>
                <?php if($is_desc): ?>
                    <div class="pxl-item--desc">
                        <span class="pxl-desc--text">
                            <?php echo esc_attr($desc); ?>
                        </span>
                    </div>
                <?php endif; ?>
                <?php if($is_form) : ?>
                    <div class="pxl-wpcf7-wrap">                        
                        <?php echo do_shortcode('[contact-form-7 id="'.esc_attr( $settings['form_id'] ).'"]'); ?>
                        <?php if($is_loader) : ?>
                            <div class="pxl-wpcf7-bg-loader"></div>
                            <div class="pxl-wpcf7-loader"></div>
                        <?php endif; ?>
                    </div>
                <?php else: ?>
                    <div><?php echo esc_html__('Add form here.', 'solarva') ?></div>
                <?php endif; ?>
            </div>
        </div>
    </div>
