{% macro questionDataOptions(form, data_type, enum) %}
  {% if data_type == enum.question_type.NUMBER %}

    {{
      form.number_type(
      params={
              "hint": {
                "text": "The answer will be validated and you can change this later."
              },
        "fieldset": {
              "legend": {
              "text":"Type of number",
                "classes": "govuk-!-font-weight-bold"
              },
            },
            "items": [
              {},
              {
                "conditional": {
                  "html": form.max_decimal_places(params={"classes":"govuk-input--width-4" })
                }
              }
            ]
      })
    }}
  {% elif data_type == enum.question_type.FILE_UPLOAD %}
    {% set hint_items = [] %}
    {% for item in enum.file_upload_types_enum %}
      {%
        do hint_items.append({
          "hint": {
            "text": (item.extensions | join(", "))
          }
        })
      %}
    {% endfor %}
    {{
      form.file_types_supported(
          params={
            "hint": {
              "text": "Grant recipients will be shown and limited to the file types selected"
            },
            "fieldset": {
              "legend": {
              "text":"Accepted file types",
              "classes": "govuk-!-font-weight-bold"
            },
          },
          "items": hint_items
        }
      )
    }}

    {{
      form.maximum_file_size(
        params={
          "fieldset": {
            "legend": {
              "text": "Maximum file size",
              "classes": "govuk-!-font-weight-bold"
            }
          }
        }
      )
    }}
  {% endif %}
{% endmacro %}
