<ul class="{{widget.attrs.container_class}}">
	{% for group_name, group_choices, group_index in widget.optgroups %}
		{% for option in group_choices %}
			{% if option.value %}
				<li style="display: content;">
					<input
						style="display: none;"
						name="{{option.name}}"
						id="{{widget.attrs.id}}{{group_index}}"
						type="radio"
						value="{{option.value.instance.id}}"
						{% if widget.attrs.current_selected_value|stringformat:'s' == option.value.instance.id|stringformat:'s' %}checked="checked"{% endif %}
					/>
					<label class="{{widget.attrs.item_class}}" for="{{widget.attrs.id}}{{group_index}}">
						{% if widget.attrs.item_template %}
							{% include widget.attrs.item_template with object=option.value.instance %}
						{% endif %}
					</label>
				</li>
			{% endif %}
		{% endfor %}
	{% endfor %}
</ul>