<xf:title>{{ phrase('th_child_styles_for_x_uix', { 'product_name': $product.product_name }) }}</xf:title>

<xf:if is="!$canWriteDirs && !$xf.options.th_enableFtp_uix">
	<div class="blockMessage blockMessage--error">
		<h2 style="margin: 0 0 .5em 0">UI.X Error</h2>
		<p>
			Your XenForo directory is not writable by the PHP user. You can contact your host and recommend they use a method that allows PHP to run as the same user that owns the XenForo files or alternatively you can <a href="https://www.themehouse.com/help/documentation/uix2/installing-uix-2-manually">install your style manually</a>.<br>
			Alternatively, you can enable the option to install via FTP <a href="http://xf2.dev/admin.php?options/groups/th_uix/" target="_BLANK">here</a> which should allow you to proceed.
		</p>
	</div>
</xf:if>

<xf:css src="th_style_list_uix.less" />

<xf:if is="$style->th_child_style_cache_uix is not empty">
	<xf:form action="{{ link('styles/themehouse') }}" class="block">
		<div class="block-container">
			<div class="block-body">
				<xf:datalist>
					<xf:foreach loop="$style->getChildStyles()" key="$xmlName" value="$childStyle">
						<xf:datarow>
							<xf:main label="{$childStyle.style_name}" />

							<xf:if is="!{$childStyle.installed}">
								<xf:cell class="dataList-cell--min uix_dataList-cel uix_dataList-cel--install" href="{{ link('styles/themehouse/child-styles/install', null, { 'product_id': $product.id, 'style_id': $style.style_id, 'child_style': $xmlName }) }}">{{ phrase('install') }}</xf:cell>
							</xf:if>
						</xf:datarow>
					</xf:foreach>
				</xf:datalist>
			</div>
			<div class="block-footer">
				<span class="u-pullRight">{{ phrase('showing_x_of_y_items', {'count': count($style->th_child_style_cache_uix), 'total': count($style->th_child_style_cache_uix)}) }}</span>
			</div>
		</div>
	</xf:form>
	<xf:else />
	<div class="blockMessage">{{ phrase('th_no_child_styles_found_for_x_uix', { 'product_name': $product.product_name, 'refresh_url': $refreshUrl }) }}</div>
</xf:if>