<xf:form action="{{ link('templates/search') }}">
	<div class="menu-row">
		{{ phrase('style:') }}
		<div class="u-inputSpacer">
			<xf:macro template="style_macros" name="style_select"
				arg-styleTree="{$styleTree}"
				arg-styleId="{$style.style_id}"
				arg-row="{{ false }}" />
		</div>
	</div>

	<div class="menu-row">
		{{ phrase('template_type:') }}
		<div class="u-inputSpacer">
			<xf:select name="type" value="{$conditions.type}">
				<xf:foreach loop="$types" key="$typeId" value="$type">
					<xf:option value="{$typeId}">{$type}</xf:option>
				</xf:foreach>
			</xf:select>
		</div>
	</div>

	<div class="menu-row menu-row--separated">
		{{ phrase('add_on:') }}
		<div class="u-inputSpacer">
			<xf:macro template="addon_macros" name="addon_select"
				arg-addOnId="{$conditions.addon_id}"
				arg-includeAny="{{ true }}"
				arg-row="{{ false }}" />
		</div>
	</div>

	<div class="menu-row">
		{{ phrase('title_contains:') }}
		<div class="u-inputSpacer">
			<xf:textbox name="title" type="search" value="{$conditions.title}" dir="ltr" />
		</div>
	</div>

	<div class="menu-row menu-row--separated">
		{{ phrase('text_contains:') }}
		<div class="u-inputSpacer">
			<ul class="inputList">
				<li>
					<xf:textarea name="template" value="{$conditions.template}" autosize="true" code="true" />
				</li>
				<li><xf:checkbox standalone="true"><xf:option name="template_cs" selected="{$conditions.template_cs}" label="{{ phrase('case_sensitive') }}" /></xf:checkbox></li>
			</ul>
		</div>
	</div>

	<div class="menu-row menu-row--separated">
		{{ phrase('template_status:') }}
		<div class="u-inputSpacer">
			<xf:checkbox name="state[]" value="{$conditions.state}">
				<xf:option value="default">{{ phrase('unmodified') }}</xf:option>
				<xf:option value="inherited">{{ phrase('modified_in_parent_style') }}
				</xf:option>
				<xf:option value="custom">{{ phrase('modified_in_this_style') }}</xf:option>
			</xf:checkbox>
		</div>
	</div>

	<div class="menu-footer">
		<span class="menu-footer-controls">
			<xf:button type="submit" icon="search" class="button--primary">{{ phrase('refine_search') }}</xf:button>
		</span>
	</div>
	<xf:hiddenval name="search">1</xf:hiddenval>
</xf:form>