{% from "components/question/_macro.njk" import onsQuestion %}
{% from "components/checkboxes/_macro.njk" import onsCheckboxes %}

{%
    call onsQuestion({
        "title": "Do you have any dietary requirements?",
        "legendIsQuestionTitle": true,
        "classes": "ons-u-mt-no"
    })
%}
    {{
        onsCheckboxes({
            "checkboxesLabel": "Select all that apply",
            "dontWrap": true,
            "name": "dietary",
            "checkboxes": [
                {
                    "id": "gluten-free-example-checkbox-with-visible-text-input",
                    "label": {
                        "text": "Gluten free"
                    },
                    "value": "gluten-free"
                },
                {
                    "id": "lactose-intolerant-example-checkbox-with-visible-text-input",
                    "label": {
                        "text": "Lactose intolerant"
                    },
                    "value": "lactose-intolerant"
                },
                {
                    "id": "vegan-example-checkbox-with-visible-text-input",
                    "label": {
                        "text": "Vegan"
                    },
                    "value": "vegan"
                },
                {
                    "id": "vegetarian-example-checkbox-with-visible-text-input",
                    "label": {
                        "text": "Vegetarian"
                    },
                    "value": "vegetarian"
                },
                {
                    "id": "other-checkbox-with-visible-text-input",
                    "label": {
                        "text": "Other"
                    },
                    "value": "other",
                    "other": {
                        "open": true,
                        "id": "other-textbox-example-checkbox-with-visible-text-input",
                        "name": "other-answer",
                        "label": {
                            "text": "Enter dietary requirements"
                        }
                    }
                }
            ]
        })
    }}
{% endcall %}
