<div class="govuk-form-group">
  {% if not form.greater_than_expression.data %}
    {% set addDataButton %}
      {{ form.add_context(params={"html": "Reference data <span class='govuk-visually-hidden'>for minimum value</span>", "classes": "govuk-button--secondary govuk-!-margin-bottom-0", "value": "greater_than_expression"}) }}
    {% endset %}

    {{ form.greater_than_value(params={"classes": "govuk-input--width-10", "formGroup": {"afterInput": {"html": addDataButton } } }) }}
  {% else %}
    {% set removeDataButton %}
      {{ form.remove_context(params={"html": "Remove data <span class='govuk-visually-hidden'>reference for minimum value</span>", "classes": "govuk-button--secondary govuk-!-margin-bottom-0", "value": "greater_than_expression"}) }}
    {% endset %}
    <div data-module="context-aware-editor" data-toolbar-enabled="false" data-i18n="{}" data-wrapper-classes="govuk-input--width-20">
      <div class="govuk-!-display-none" data-context nonce="{{ csp_nonce() }}">{{ g.context_keys_and_labels | tojson }}</div>
      {{ form.greater_than_expression(params={"classes": "govuk-!-margin-bottom-0", "attributes": {"data-context-aware-editor-target": "", "readonly": ""}, "formGroup": {"classes": "app-context-aware--container", "afterInput": {"html": removeDataButton }}
      }) }}
    </div>
  {% endif %}

  {{ form.greater_than_inclusive() }}
</div>
