{% extends "layouts/base.njk" %}

{% block beforeContent %}
  {{ govukBreadcrumbs({
    classes: "govuk-!-display-none-print",
    items: breadcrumbItems
  }) if showBreadcrumbs }}
{% endblock %}

{% block content %}
  <div class="govuk-grid-row">
    <div class="govuk-grid-column-one-quarter-from-desktop">
      {{ xGovukSubNavigation({
        items: collections.navigation | eleventyNavigation(sectionKey or options.homeKey) | itemsFromNavigation(page.url, true)
      }) }}
    </div>
    <div class="govuk-grid-column-three-quarters-from-desktop">
      {{ appDocumentHeader({
        caption: caption,
        title: title,
        description: description
      }) }}

      {{ appProseScope(content) if content }}

      {% if showPagination %}
        {% set previous = collections.navigation | eleventyNavigation(sectionKey or options.homeKey) | getPreviousNavigationItem(page.url) %}
        {% set next = collections.navigation | eleventyNavigation(sectionKey or options.homeKey) | getNextNavigationItem(page.url) %}
        {{ govukPagination({
          previous: {
            labelText: previous.title,
            href: previous.url
          } if previous,
          next: {
            labelText: next.title,
            href: next.url
          } if next
        }) }}
      {% endif %}

      {% include "layouts/shared/related.njk" %}
    </div>
  </div>
{% endblock %}
