<?php
/**
 * The template for displaying archive pages
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package MarComm-AUX
 */

use WP_AUX\Entities\Search\SearchSidebarEntity;
use WP_AUX\Services\HtmlService;

get_header();
?>
<main id="main-content">
  <span class="divider-dots gray-300"></span>
  <div class="page-header">
    <?php echo aux_archive_heading_background(); ?>
    <div class="page-header__container">
      <div class="page-header__content">
        <?php
          echo aux_archive_heading_group();
          echo HtmlService::paragraph(get_the_archive_description(), 'page-header__description');
        ?>
      </div>
    </div>
  </div>
  <?php
    if (SearchSidebarEntity::instance()->getSidebarEnabled()) {
      get_template_part('template-parts/search-results');
    } else {
      get_template_part('template-parts/archive-results');
    }
  ?>
</main><!-- #main -->
<?php
get_footer();
