<xf:if is="$asArchive">
	<xf:title>{{ phrase('export_style_as_archive:') }} {$style.title}</xf:title>
<xf:else />
	<xf:title>{{ phrase('export_style_as_xml:') }} {$style.title}</xf:title>
</xf:if>

<xf:set var="$addOnRepo" value="{{ $xf.app.em.getRepository('XF:AddOn') }}" />

<xf:form action="{{ link(($asArchive ? 'styles/export-archive' : 'styles/export'), $style) }}" class="block">
	<div class="block-container">
		<div class="block-body">
			<xf:if is="$asArchive">
				<xf:inforow>
					<div class="blockMessage blockMessage--important"><strong>{{ phrase('note:') }}</strong> {{ phrase('style_archives_only_contain_files_extensions_x', {'extensions': $allowedExtensions|join(', ')}) }}</div>
				</xf:inforow>
			</xf:if>
			<xf:formrow label="{{ phrase('style') }}">{$style.title}</xf:formrow>

			<xf:selectrow name="addon_id"
				label="{{ phrase('export_from_add_on') }}">

				<xf:option>{{ phrase('(all)') }}</xf:option>
				<xf:foreach loop="$addOnRepo.findAddOnsForList().fetch()" value="$addOn">
					<xf:option value="{$addOn.addon_id}">{$addOn.title}</xf:option>
				</xf:foreach>
			</xf:selectrow>

			<xf:if is="$xf.designer OR $xf.development">
				<xf:checkboxrow>
					<xf:option name="independent"
						label="{{ phrase('export_as_independent_style') }}"
						hint="{{ phrase('if_selected_customizations_in_parent_styles_will_be_included') }}" />
				</xf:checkboxrow>
			</xf:if>
		</div>
		<xf:submitrow icon="export" />
	</div>
</xf:form>