<xf:checkboxrow>
	<xf:option
		name="type_config[allow_downvote]"
		selected="{$typeConfig.allow_downvote}"
		label="{{ phrase('allow_suggestions_to_be_downvoted') }}"
		hint="{{ phrase('if_disabled_users_may_only_upvote_suggestions') }}" />
</xf:checkboxrow>

<xf:if is="$prefixesGrouped is not empty">
	<xf:formrow label="{{ phrase('implemented_prefixes') }}"
		explain="{{ phrase('implemented_prefixes_desc') }}"
		rowtype="input">

		<xf:select name="type_config[implemented_prefix_ids][]"
			multiple="multiple"
			value="{$typeConfig.implemented_prefix_ids}"
			class="js-availablePrefixSelect">

			<xf:foreach loop="$prefixGroups" key="$prefixGroupId" value="$prefixGroup"
				if="{{ count($prefixesGrouped.{$prefixGroupId}) > 0 }}">
				<xf:optgroup label="{{ $prefixGroupId > 0 ? $prefixGroup.title : phrase('ungrouped') }}">
					<xf:foreach loop="{$prefixesGrouped.{$prefixGroupId}}" key="$prefixId" value="$prefix">
						<xf:option value="{$prefixId}" disabled="{{ !in_array($prefixId, $forum.prefix_cache) }}">{$prefix.title}</xf:option>
					</xf:foreach>
				</xf:optgroup>
			</xf:foreach>
		</xf:select>
	</xf:formrow>

	<xf:formrow label="{{ phrase('closed_prefixes') }}"
		explain="{{ phrase('closed_prefixes_desc') }}"
		rowtype="input">

		<xf:select name="type_config[closed_prefix_ids][]"
			multiple="multiple"
			value="{$typeConfig.closed_prefix_ids}"
			class="js-availablePrefixSelect">

			<xf:foreach loop="$prefixGroups" key="$prefixGroupId" value="$prefixGroup"
				if="{{ count($prefixesGrouped.{$prefixGroupId}) > 0 }}">
				<xf:optgroup label="{{ $prefixGroupId > 0 ? $prefixGroup.title : phrase('ungrouped') }}">
					<xf:foreach loop="{$prefixesGrouped.{$prefixGroupId}}" key="$prefixId" value="$prefix">
						<xf:option value="{$prefixId}" disabled="{{ !in_array($prefixId, $forum.prefix_cache) }}">{$prefix.title}</xf:option>
					</xf:foreach>
				</xf:optgroup>
			</xf:foreach>
		</xf:select>
	</xf:formrow>
</xf:if>

<xf:if is="$node.exists() AND !$isTypeChange">
	<xf:formrow>
		<xf:button href="{{ link('forums/suggestion-convert-reactions', $node) }}"
			class="button--link"
			data-xf-click="overlay">
			{{ phrase('convert_reactions_to_votes') }}
		</xf:button>
	</xf:formrow>
</xf:if>