{% extends "yes-no.njk" %}
{% set title = 'Do you want to add an alternative ecologist contact?' %}
{% set radioHint = 'This alternative contact must be someone who is authorised to deal with this application on behalf of the named ecologist.' %}
{% set noneSelected = 'Select yes if you want to add an additional ecologist contact' %}

{% block pageContent %}
    {{ govukRadios({
      idPrefix: "yes-no",
      name: "yes-no",
      isPageHeading: false,
      hint: {
        text: radioHint
      } if radioHint,
      errorMessage: {
        text: noneSelectedButton if noneSelectedButton else noneSelected
      } if error['yes-no'] === 'any.required',
      items: [
        {
          value: "yes",
          text: "Yes",
          checked: data.yesNo === 'yes' or payload['yes-no'] === 'yes'
        },
        {
          value: "no",
          text: "No - I am the only ecologist" if data.isSignedInUserEcologist else "No",
          checked: data.yesNo === 'no' or payload['yes-no'] === 'no'
        }
      ]
    }) }}
{% endblock %}
