<?php 
// Check if comments are open or there are comments
if ( comments_open() || get_comments_number() ) :
?>
<!-- Start Comments -->
<div class="container">
    <div class="detail-blog-comments">
        <h4 class="title fw-bold text-center">
            <?php esc_html_e('Comments', 'kavehTheme'); ?>
            <span class="fw-normal"><?php esc_html_e('Users', 'kavehTheme'); ?></span>
        </h4>
        <div class="detail-blog-comments-wrapper position-relative bg-white">
            <!-- Start Comments List -->
            <ul class="comments">
                <?php
                wp_list_comments(array(
                    'callback' => 'kavehTheme::custom_comment_template',
                ));
                ?>
            </ul>
            <!-- End Comments List -->

            <!-- Start Send Comment -->
            <?php
            comment_form(array(
                'class_form' => 'send-comment',
                'title_reply' => '',
                'comment_field' => '
                    <div class="row">
                        <div class="col-12">
                            <div class="form-group position-relative">
                                <label for="content">' . esc_html__('Your Comment', 'kavehTheme') . '</label>
                                <textarea name="comment" id="content" class="form-control"></textarea>
                            </div>
                        </div>
                    </div>
                ',
                'submit_button' => '<button type="submit" class="btn btn-primary rounded-pill p-0 w-100">' . esc_html__('Submit Comment', 'kavehTheme') . '</button>',
                'comment_notes_before' => '',
                'comment_notes_after' => '',
                'fields' => apply_filters('comment_form_default_fields', array()),
                'class_container' => '',
                'comment_notes_after' => '',
                'format' => 'html5'
            ));
            ?>
            <!-- End Send Comment -->
        </div>
    </div>
</div>
<!-- End Comments -->
<?php endif; ?>