<th:block
  th:fragment="comment(title, haloComment)"
  th:with="commentProvider=${theme.config.comment?.provider ?: 'halo'}"
>
  <h3 th:if="${haloCommentEnabled and commentProvider != 'none'}" class="comment-title">
    <span class="icon-[ph--chat-circle-text-bold]"></span>
    <span th:text="${title}"></span>
  </h3>

  <th:block th:switch="${commentProvider}">
    <th:block th:case="'twikoo'">
      <th:block th:replace="~{modules/comment/twikoo :: twikoo}"></th:block>
    </th:block>
    <th:block th:case="'halo'">
      <th:block
        th:if="${haloCommentEnabled and haloComment != null}"
        th:replace="~{modules/comment/halo :: halo(group=${haloComment.group}, kind=${haloComment.kind}, name=${haloComment.name})}"
      ></th:block>
    </th:block>
  </th:block>
</th:block>
