<?php
/**
 * @package Case-Themes
 */

if ( post_password_required() ) {
    return;
    } ?>

    <div id="comments" class="comments-area">

        <?php
        if ( have_comments() ) : ?>
            <div class="comment-list-wrap">

                <div class="comment-heading h7">
                    <?php echo esc_html__('Comments', 'solarva'); ?>
                </div>

                <?php the_comments_navigation(); ?>

                <ul class="comment-list">
                    <?php
                        wp_list_comments( array(
                            'style'      => 'ul',
                            'short_ping' => true,
                            'callback'   => 'solarva_comment_list',
                            'max_depth'  => 3
                        ) );
                    ?>
                </ul>

                <?php the_comments_navigation(); ?>
            </div>
            <?php if ( ! comments_open() ) : ?>
                <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'solarva' ); ?></p>
            <?php
            endif;

        endif;
    $args = array(
            'id_form'           => 'commentform',
            'id_submit'         => 'submit',
            'class_submit'         => 'btn pxl-btn-submit pxl-btn-basic pxl-btn-basic1 pxl-hover-split-bg',
            'title_reply'       => esc_attr__( 'Make a Comment', 'solarva'),
            'title_reply_to'    => esc_attr__( 'Make a Comment To ', 'solarva') . '%s',
            'cancel_reply_link' => esc_attr__( 'X', 'solarva'),
            'submit_button'     => '<button name="%1$s" type="submit" id="%2$s" class="%3$s" data-text="'.esc_html__('Contact Us', 'solarva').'"/><span class="pxl-btn--text">'.esc_html__('Contact Us', 'solarva').'</span></button>',
            'comment_notes_before' => '',
            'fields' => apply_filters( 'comment_form_default_fields', array(
                    'note' => 
                    '<div class="comment-form-inner"><div class="comment-note">'.esc_html__('Your email address will not be published. Required field are marked*', 'solarva').'</div><div class="comment-form-group">',
                    'author' =>
                    '<div class="comment-form-author comment-item">'.
                    '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .
                    '" size="30" placeholder="'.esc_attr__('Name*', 'solarva').'"/></div>',

                    'email' =>
                    '<div class="comment-form-email comment-item">'.
                    '<input id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) .
                    '" size="30" placeholder="'.esc_attr__('Email Address*', 'solarva').'"/></div></div>',
            )
            ),
            'comment_field' =>  '<div class="comment-form-comment"><textarea id="comment" name="comment" rows="8" placeholder="'.esc_attr__('Comment Here', 'solarva').'" aria-required="true">' .
            '</textarea></div>',
    );
    comment_form($args); ?>
</div>