<?php $bauen_options = get_option('bauen'); ?>
<?php
if ( post_password_required() ) {
	return;
}
?>

<?php
if ( have_comments() ) : ?>
        
		<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
		<?php global $bauen_sidebar_class; ?>
		    <?php if (Bauen_AfterSetupTheme::return_thme_option('blogdetailstyle')=='st2'){ ?>
			    <?php $bauen_sidebar_class = "col-md-7";?>
			<?php } 
			else { ?>			
		        <?php $bauen_sidebar_class = "col-md-12";?>
			<?php } ;?>	  
		<?php else : ?>
		    <?php $bauen_sidebar_class = "col-md-7";?>
		<?php endif;?>        
		
		<div class="<?php echo esc_attr($bauen_sidebar_class);?>">
		
			<!-- .comments-title -->

			<?php the_comments_navigation(); ?>
			
			<ul class="comments__list">
				
				<?php
					wp_list_comments( array(
						'callback'   => 'bauen_comment',
						'short_ping' => true,
					) );
				?>
			</ul><!-- .comment-list -->
			<div class="clearfix"></div>
			
			<?php the_comments_navigation();
			// If comments are closed and there are comments, let's leave a little note, shall we?
			if ( ! comments_open() ) : ?>
				<p class="no-comments"><?php if(!empty($bauen_options['translet_opt_13'])):?><?php echo esc_html(Bauen_AfterSetupTheme::return_thme_option('translet_opt_13',''));?><?php else: ?><?php esc_html_e( 'Comments are closed.', 'bauen' ); ?><?php endif;?></p>
			
		<?php
			endif; ?>
			</div>
		<?php endif; // Check for have_comments().
		?>
		
		<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
		<?php global $bauen_sidebar_class; ?>
		    <?php if (Bauen_AfterSetupTheme::return_thme_option('blogdetailstyle')=='st2'){ ?>			   
			    <?php $bauen_sidebar_class = "col-md-4 offset-md-1";?>
			<?php } 
			else { ?>			
		        <?php $bauen_sidebar_class = "col-md-7";?>
			<?php } ;?>					
		<?php else : ?>
            <?php if ( have_comments() ) : ?>		
		        <?php $bauen_sidebar_class = "col-md-4 offset-md-1";?>
			<?php else : ?>
			    <?php $bauen_sidebar_class = "col-md-7";?>
			<?php endif;?>  
		<?php endif;?>        		
		
		<div class="<?php echo esc_attr($bauen_sidebar_class);?> ">
			<div class="row">
				<div class="col-md-12">

				<?php
				$bauen_args = array(
					'fields' => apply_filters(
					'comment_form_default_fields', array(
					'author' =>'<input id="author" class="form-input"  placeholder="'. esc_attr__('Your Name','bauen') .'*" name="author" type="text" value="' .esc_attr( $commenter['comment_author'] ) . '" size="40"/>',
						'email'  => '<input id="email" class="form-input" placeholder="'. esc_attr__('Your Email','bauen') .'*" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) .'" size="40"/>',
					)
					),
					'comment_field' => '<textarea id="comment" class="form-input" name="comment" cols="10" rows="9" placeholder="'. esc_attr__('Your Comment','bauen') .'*" aria-required="true"></textarea>',
					'comment_notes_after' => '<button type="submit" name="submit" id="submit" class="butn-dark mt-15"><a href="#0"><span>'. esc_html__('Post Comment','bauen') .'</span></a></button>',
					'title_reply' => '<h3>' . esc_html__( 'Leave a Reply', 'bauen' ) . '</h3>'
					
				);
				comment_form($bauen_args);
				?>
				
				</div>
			</div>
		</div>		