<hr class="formRowSep" />

<xf:if is="$nodeTree.getFlattened(0) is not empty">
	<xf:selectrow name="options[node_id]" value="{$options.node_id}"
		label="{{ phrase('search_forum') }}"
		explain="{{ phrase('threads_will_be_displayed_from_selected_search_forum') }}">

		<xf:option value="0" label="{{ phrase('(none)') }}" />

		<xf:foreach loop="$nodeTree.getFlattened(0)" value="$treeEntry">
			<xf:option value="{$treeEntry.record.node_id}"
				disabled="{{ $treeEntry.record.node_type_id != 'SearchForum' }}"
				label="{{ repeat('&nbsp;&nbsp;', $treeEntry.depth)|raw }} {$treeEntry.record.title}" />
		</xf:foreach>
	</xf:selectrow>
<xf:else />
	<xf:formrow label="{{ phrase('search_forum') }}" rowtype="button">
		<div class="block-rowMessage block-rowMessage--important">
			{{ phrase('no_search_forum_nodes_have_been_added_yet_add_one', {'add_link': link('search-forums/add')}) }}
		</div>
	</xf:formrow>
</xf:if>

<xf:numberboxrow name="options[limit]" value="{$options.limit}" min="1"
	label="{{ phrase('maximum_entries') }}" />

<xf:radiorow name="options[style]" value="{{ $options.style ?: 'simple' }}"
	label="{{ phrase('display_style') }}">

	<xf:option value="simple"
		label="{{ phrase('simple') }}"
		hint="{{ phrase('widget_display_simple_explain') }}" />
	<xf:option value="full"
		label="{{ phrase('standard') }}"
		hint="{{ phrase('new_threads_display_style_full_explain') }}" />
	<xf:option value="expanded"
		label="{{ phrase('expanded') }}"
		hint="{{ phrase('new_threads_display_style_expanded_explain') }}">

		<xf:checkbox>
			<xf:option name="options[show_expanded_title]" selected="$options.show_expanded_title">
				{{ phrase('display_widget_title_above_list_of_threads') }}
			</xf:option>
		</xf:checkbox>
	</xf:option>
</xf:radiorow>