<?php
/**
 * Testimonial Section
 * 
 * @package Wellness_Coach_Lite
 */
$testimonial_title    = get_theme_mod( 'testimonial_title', __( 'Testimonials', 'wellness-coach-lite' ) );
$testimonial_content  = get_theme_mod( 'testimonial_content' );
$testimonial_btn      = get_theme_mod( 'testimonial_slider_btn_label', __( 'View All Testimonial', 'wellness-coach-lite' ) );
$testimonial_btn_link = get_theme_mod( 'testimonial_slider_btn_link' );

if( is_active_sidebar( 'testimonial' ) ){ ?>
<section id="testimonial_section" class="testimonial-section">
	<?php if( $testimonial_title || $testimonial_content ) : ?>
		<header class="section-header">
			<div class="container">
				<?php if( $testimonial_title ) echo '<h2 class="section-title">' . esc_html( $testimonial_title ) . '</h2>'; ?>
				<?php if( $testimonial_content ) echo '<div class="section-desc">' . esc_html( $testimonial_content ) . '</div>'; ?>
			</div>
    	</header>
    <?php endif; ?>
    <div class="testimonial-sec__content-wrapper">
		<div class="container">
			<div class="testimonial__inner-wrapper owl-carousel">
	    		<?php dynamic_sidebar( 'testimonial' ); ?>
	    	</div>
    	</div>
    </div>

    <?php if( $testimonial_btn && $testimonial_btn_link ) : ?>
		<div class="section-button-wrapper">
			<a href="<?php echo esc_url( $testimonial_btn_link ); ?>" class="wc-btn wc-btn-two"><?php echo esc_html( $testimonial_btn ); ?></a>
		</div>
    <?php endif; ?>
</section> <!-- .testimonial-section -->
<?php
}