{% for form_item in vars.form_data.conditions %}

	{% if form_item.type == 'condition' %}

		{% set is_unselected_condition = form_item.value == '--' %}

		<div class="row mb-3">

			<div class="col-4">

				<select class="form-select form-control" name="{{ form_item.name }}">

					{% if form_item.value == '--' %}
						<option value="--" selected>+ Select Condition</option>
					{% else %}
						<option value="--">- Delete This Condition</option>
					{% endif %}

					{% for type,type_label in vars.types %}
						<optgroup label="{{ type_label }}">
							{% for condition in vars.all_conditions %}
								{% if condition.type == type %}
									<option value="{{ condition.slug }}"
											{% if form_item.value == condition.slug %}selected{% endif %}>
										{{ condition.name }}
									</option>
								{% endif %}
							{% endfor %}
						</optgroup>
					{% endfor %}
				</select>
			</div>

			<div class="col-3">
				<div class="btn-group" role="group" aria-label="Basic radio toggle button group">
					{% for opt_value,opt_label in form_item.invert.options %}
						<input type="radio"
							   class="btn-check" name="{{ form_item.name~'_'~form_item.invert.name }}"
							   value="{{ opt_value }}"
							   id="{{ form_item.name~form_item.invert.name }}_{{ opt_value }}" autocomplete="off"
							   {% if form_item.invert.value==opt_value %}checked{% endif %}>
						<label class="btn btn-outline-primary"
							   for="{{ form_item.name~form_item.invert.name }}_{{ opt_value }}">{{ opt_label }}</label>
					{% endfor %}
				</div>
			</div>

			<div class="col-1">
				<button class="btn btn-outline-warning svg-container delete-condition"
						type="button"
						data-condition_name="{{ form_item.name }}"
						type="button">{{ imgs.icon_delete|raw }}</button>
			</div>

		</div>

		{% if form_item.params|length > 0 %}
			<div class="row">
				<div class="col-6 col-xl-4 offset-1 mb-3">
					{% set params = form_item.params %}
					{% include '/components/rules/builder_components/parameters.twig' %}
				</div>
			</div>
		{% endif %}

	{% endif %}

{% endfor %}