<?php
/**
 * Comments template
 *
 * @package Multi
 */

?>

<?php
if ( comments_open() ) :
	$multimagazine_heading_style = multimagazine_heading_style();
	?>
	<?php if ( $comments ) : ?>
		<section class="comments" id="comments">
			<?php /* translators: %s is replced by comment count */ ?>
			<h2 class="spec-heading <?php echo esc_attr( $multimagazine_heading_style ); ?>"><span><?php printf( esc_html( _n( '%s comment', '%s comments', get_comments_number(), 'multimagazine' ) ), esc_html( number_format_i18n( get_comments_number() ) ) ); ?></span></h2>
			<ul class="commentlist">
				<?php wp_list_comments( 'callback=multimagazine_comment' ); ?>
			</ul>
			<?php paginate_comments_links(); ?>
		</section>
	<?php endif; ?>
	<section class="leave-comment">
		<h2 class="spec-heading <?php echo esc_attr( $multimagazine_heading_style ); ?>"><span><?php esc_html_e( 'Leave a Comment', 'multimagazine' ); ?></span></h2>
		<?php
		comment_form(
			array(
				'submit_button' => '<button name="%1$s" type="submit" id="%2$s" class="%3$s" value="1">%4$s</button>',
				'class_submit'  => implode(
					' ',
					array(
						'button',
						'submit',
						get_theme_mod( 'multi_buttons_type', MULTIMAGAZINE_BUTTONS_TYPE ),
						get_theme_mod( 'multi_buttons_size', MULTIMAGAZINE_BUTTONS_SIZE ),
						get_theme_mod( 'multi_button_text_transform', MULTIMAGAZINE_BUTTON_TEXT_TRANSFORM ) ? 'text-transform-' . get_theme_mod( 'multi_button_text_transform', MULTIMAGAZINE_BUTTON_TEXT_TRANSFORM ) : '',
						get_theme_mod( 'multi_button_animation', MULTIMAGAZINE_BUTTON_ANIMATION ) ? 'ani-bg ' . get_theme_mod( 'multi_button_animation', MULTIMAGAZINE_BUTTON_ANIMATION ) : '',
					)
				),
			)
		);
		?>
	</section>
<?php endif; ?>
