{% from "govuk/components/footer/macro.njk" import govukFooter -%}

{% set about_items = [
  {
    "href": 'https://www.gca.gov.uk/contact',
    "text": 'Contact'
  },
  {
    "href": 'https://www.gov.uk/guidance/digital-marketplace-buyers-guide',
    "text": 'Services you can buy'
  },
  {
    "href": 'https://www.gov.uk/government/organisations/crown-commercial-service',
    "text": 'About Government Commercial Agency'
  },
  {
    "href": 'https://www.gov.uk/government/organisations/government-digital-service',
    "text": 'About Government Digital Services'
  }
] %}

{% for live_framework in params.live_frameworks or [] %}
  {%- set _about_items = about_items.push({
    "href": "external.suppliers_list_by_prefix" | urlFor({ framework_slug: live_framework.slug }),
    "text": live_framework.name + " supplier A to Z"
  }) -%}
{% endfor %}

{{ govukFooter({
  "navigation": [
    {
      "title": 'About Digital Marketplace',
      "width": "one-half",
      "items": about_items
    },
    {
      "title": 'Guidance for using Digital Marketplace',
      "width": "one-half",
      "items": [
        {
          "href": 'https://www.gov.uk/guidance/g-cloud-suppliers-guide',
          "text": 'Applying to sell on the G-Cloud framework'
        },
        {
          "href": 'https://www.gca.gov.uk/information-for-buyers-and-suppliers/start-supplying',
          "text": 'Applying to sell on the DOS framework'
        },
        {
          "href": 'https://www.gov.uk/guidance/g-cloud-buyers-guide',
          "text": 'Buying on the G-Cloud framework'
        },
        {
          "href": 'https://www.gov.uk/guidance/digital-outcomes-and-specialists-buyers-guide',
          "text": 'Buying on the DOS framework'
        },
        {
          "href": 'https://www.gov.uk/guidance/the-crown-hosting-data-centres-framework-on-the-digital-marketplace',
          "text": 'Buying on the Crown Hosting framework'
        }
      ]
    }
  ],
  "meta": {
    "items": [
      {
        "href": 'external.terms_and_conditions' | urlFor,
        "text": 'Terms and conditions'
      },
      {
        "href": 'external.cookies' | urlFor,
        "text": 'Cookies'
      },
      {
        "href": 'external.privacy_notice' | urlFor,
        "text": 'Privacy notice'
      },
      {
        "href": 'external.accessibility_statement' | urlFor,
        "text": 'Accessibility statement'
      }
    ],
    "html": 'Built by the <a href="https://www.gov.uk/government/organisations/government-digital-service" class="govuk-footer__link">Government Digital Service</a>'
  }
}) }}
