{% from "components/address-input/_macro.njk" import onsAddressInput %}

{{
    onsAddressInput({
        "id": "address-input",
        "dontWrap": true,
        "label": {
            "text": "Enter address or postcode and select from results",
            "id": "address-label-input"
        },
        "isEditable": false,
        "mandatory": true,
        "externalInitialiser": true,
        "autocomplete": "off",
        "apiDomain": "https://mock-address-api.gcp.onsdigital.uk",
        'apiDomainBearerToken': "some_token",
        "instructions": "Use up and down keys to navigate suggestions once you\'ve typed more than two characters. Use the enter key to select a suggestion. Touch device users, explore by touch or with swipe gestures.",
        "ariaYouHaveSelected": "You have selected",
        "ariaMinChars": "Enter 3 or more characters for suggestions.",
        "ariaOneResult": "There is one suggestion available.",
        "ariaNResults": "There are {n} suggestions available.",
        "ariaLimitedResults": "Results have been limited to 10 suggestions. Type more characters to improve your search",
        "ariaGroupedResults": "There are {n} for {x}",
        "groupCount": "{n} addresses",
        "moreResults": "Enter more of the address to improve results",
        "resultsTitle": "Select an address",
        "resultsTitleId": "address-results",
        "noResults": "No results found. Try entering a different part of the address",
        "tooManyResults": "{n} results found. Enter more of the address to improve results",
        "typeMore": "Enter more of the address to get results",
        "errorTitle": "There is a problem with your answer",
        "errorMessageEnter": "Enter an address",
        "errorMessageSelect": "Select an address",
        "errorMessageApi": "Sorry, there is a problem. We are working to fix it. Please try again later or",
        "errorMessageApiLinkText": "contact us for more help",
        "options": {
            "regionCode": "gb-eng",
            "addressType": "residential"
        }
    })
}}
