<xf:title>{{ phrase('add_ons') }}</xf:title>

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

<xf:pageaction>
	<xf:button href="{{ link('add-ons/install-from-archive') }}" overlay="true" icon="add">
		{{ phrase('install_upgrade_from_archive') }}
	</xf:button>
	<xf:if is="$disabled">
		<xf:button href="{{ link('add-ons/mass-toggle', null, {'enable': 1}) }}" overlay="true" data-cache="0">
			{{ phrase('enable') }}
		</xf:button>
	</xf:if>
	<xf:button href="{{ link('add-ons/mass-toggle', null, {'enable': 0}) }}" overlay="true" data-cache="0">
		{{ phrase('disable_all') }}
	</xf:button>
</xf:pageaction>

<xf:if is="$hasProcessing">
	<div class="blockMessage blockMessage--error blockMessage--iconic">
		{{ phrase('addon_action_pending_warning') }}
	</div>
</xf:if>

<xf:if is="$upgradeCheck">
	<xf:macro id="upgrade_check_macros::installable_add_ons" arg-upgradeCheck="{$upgradeCheck}" />
</xf:if>

<xf:macro id="addon_list_macros::addon_list_filter" />

<xf:if is="$total">
	<div class="addOnList">
		<!--[XF:list_block:top]-->
		<xf:macro id="addon_list_macros::addon_list_block"
			arg-addOns="{$upgradeable}"
			arg-heading="{{ phrase('upgradeable_add_ons') }}" />
		<!--[XF:list_block:below_upgradeable]-->
		<xf:macro id="addon_list_macros::addon_list_block"
			arg-addOns="{$installable}"
			arg-heading="{{ phrase('installable_add_ons') }}"
			arg-addOnDirWritable="{$addOnDirWritable}" />
		<!--[XF:list_block:below_installable]-->
		<xf:macro id="addon_list_macros::addon_list_block"
			arg-addOns="{$installed}"
			arg-heading="{{ phrase('installed_add_ons') }}" />
		<!--[XF:list_block:below_installed]-->
		<xf:macro id="addon_list_macros::addon_list_block"
			arg-addOns="{$legacy}"
			arg-heading="{{ phrase('legacy_add_ons') }}"
			arg-desc="{{ phrase('legacy_add_ons_desc') }}" />
		<!--[XF:list_block:bottom]-->
	</div>
<xf:else />
	<div class="blockMessage">{{ phrase('no_add_ons_installed_or_available_to_be_installed') }}</div>
</xf:if>