{% extends baseLayoutPath %} {% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} {% from "govuk/components/input/macro.njk" import govukInput %} {% from "govuk/components/select/macro.njk" import govukSelect %} {% from "govuk/components/button/macro.njk" import govukButton %} {% from "govuk/components/inset-text/macro.njk" import govukInsetText %} {% from "govuk/components/hint/macro.njk" import govukHint %} {% from "govuk/components/fieldset/macro.njk" import govukFieldset %} {% block content %}
{% if errors %} {{ govukErrorSummary({ titleText: "There is a problem", errorList: errors }) }} {% endif %} {% include "partials/heading.html" %}
{% switch step %} {% case "details" %} {{ govukInput(fields.postcodeQuery) }} {{ govukInput(fields.buildingNameQuery) }} {% case "select" %} {%- set detailsHtml -%} {{ details.postcodeQuery }}{% if details.buildingNameQuery %} and {{ details.buildingNameQuery }}{% endif %} {%- endset -%} {% if hasAddresses %}

{{addressCount}} address{{ "es" if hasMultipleAddresses }} found for {{ detailsHtml | safe }}. {{ searchAgainLink.text }}

{% endif %} {% if hasMultipleAddresses %} {{ govukSelect(fields.uprn) }} {% elif singleAddress %} {{ govukInput(fields.uprn) }} {{ govukInsetText({ text: singleAddress.formatted }) }} {% else %}

We could not find an address that matches {{ detailsHtml | safe }}.

{% endif %} {% case "manual" %} {% if hint %} {{ govukHint(hint) }} {% endif %} {{ govukInput(fields.addressLine1) }} {{ govukInput(fields.addressLine2) }} {{ govukInput(fields.town) }} {{ govukInput(fields.county) }} {{ govukInput(fields.postcode) }} {% endswitch %}
{{ govukButton(buttons.continueButton) }} {% if buttons.manualLink %}

or {{buttons.manualLink.text}}

{% elif buttons.detailsLink %}

or {{buttons.detailsLink.text}}

{% endif %}
{% endblock %}