<xf:title>{{ phrase('template_search_results:') }} {$style.title}</xf:title>

<div class="block">
	<xf:if is="$templates is not empty">
		<div class="block-outer">
			<xf:macro id="filter_macros::quick_filter" arg-class="block-outer-opposite" />
		</div>
	</xf:if>
	<div class="block-container">

		<xf:macro id="filter_macros::filter_bar"
			arg-route="templates/search"
			arg-content="{$style}"
			arg-params="{$linkParams}"
			arg-displayValues="{$filterDisplay}"
			arg-phrases="{{ {
				'key:type':        phrase('template_type:'),
				'key:addon_id':    phrase('add_on:'),
				'key:title':       phrase('title_contains:'),
				'key:template':    phrase('text_contains:'),
				'key:template_cs': phrase('case_sensitive'),
				'key:state':       phrase('template_status:'),
				'val:_none':       phrase('none'),
				'val:default':     phrase('unmodified'),
				'val:inherited':   phrase('modified_in_parent_style'),
				'val:custom':      phrase('modified_in_this_style')
			} }}"
			arg-menu="templates/refine-search" />

		<xf:if is="$templates is not empty">
			<div class="block-body">
				<xf:datalist>
					<xf:macro id="template_list::template_list" arg-templates="{$templates}" arg-style="{$style}" />
				</xf:datalist>
			</div>
			<div class="block-footer">
				<span class="block-footer-counter">{{ display_totals($templates) }}</span>
			</div>
		<xf:else />
			<div class="block-body block-row">{{ phrase('no_results_found') }}</div>
		</xf:if>
	</div>
</div>