<xf:title>
	<xf:if is="!$undeletableFiles">
		{{ phrase('confirm_file_deletion_for_x', {'title': $addOn.title}) }}
	<xf:else />
		{{ phrase('unable_to_delete_files_for_x', {'title': $addOn.title}) }}
	</xf:if>
</xf:title>

<xf:if is="!$undeletableFiles">
	<xf:form action="{{ link('add-ons/delete-files', $addOn) }}" class="block" ajax="true">

		<div class="block-container">
			<div class="block-body">
				<xf:inforow rowtype="confirm">
					{{ phrase('please_confirm_that_you_wish_to_delete_files_from_following_add_on:') }}
					<strong>{$addOn.title} {$addOn.version_string}</strong>
				</xf:inforow>

				<xf:if is="$conflictingFiles">
					<div class="block-row">
						<div class="block-rowMessage block-rowMessage--iconic block-rowMessage--warning">
							{{ phrase('following_files_not_deletable_as_they_may_be_in_use_by_another_add_on') }}
						</div>
						<ul>
							<xf:foreach loop="$conflictingFiles" value="$conflictingFile">
								<li><code>{$conflictingFile}</code></li>
							</xf:foreach>
						</ul>
					</div>
				</xf:if>
				<div class="block-row">
					<div class="block-rowMessage block-rowMessage--iconic block-rowMessage--important">
						{{ phrase('all_files_known_to_be_associated_with_this_add_on_will_be_deleted') }}
					</div>
				</div>
			</div>

			<h3 class="block-formSectionHeader">
				<span class="collapseTrigger collapseTrigger--block" data-xf-click="toggle" data-target="< :up:next">
					{{ phrase('view_files_to_be_deleted') }}
				</span>
			</h3>
			<div class="block-body block-body--contained block-body--collapsible" tabindex="-1">
				<div class="block-row">
					<ul>
						<xf:foreach loop="$filesToDelete" value="$file">
							<li><code>{$file}</code></li>
						</xf:foreach>
					</ul>
				</div>
			</div>

			<xf:submitrow submit="{{ phrase('delete_files') }}" rowtype="simple" />
		</div>

		<xf:redirect />
	</xf:form>
<xf:else />
	<div class="block">
		<div class="block-container">
			<div class="block-body">
				<xf:inforow>
					<div class="block-rowMessage block-rowMessage--error">
						{{ phrase('following_files_or_directories_not_deletable_due_to_file_permissions') }}
					</div>
					<ul>
						<xf:foreach loop="$undeletableFiles" value="$undeletableFile">
							<li><code>{$undeletableFile}</code></li>
						</xf:foreach>
					</ul>
				</xf:inforow>
			</div>
		</div>
	</div>
</xf:if>