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

<xf:form action="{{ link('widgets/delete', $widget, {'position_id': $positionId}) }}" class="block" ajax="true">
	<div class="block-container">
		<div class="block-body">
			<xf:inforow rowtype="confirm">
				<xf:if is="$positionId">
					{{ phrase('please_confirm_that_you_want_to_delete_following_widget_from_position_x', {'positionId': $positionId}) }}
				<xf:else />
					{{ phrase('please_confirm_that_you_want_to_delete_following:') }}
				</xf:if>
				<strong><a href="{{ link('widgets/edit', $widget) }}">{$widget.title}</a></strong>
			</xf:inforow>
		</div>
		<xf:if is="count($widget.positions) == 1">
			<div class="block-body">
				<xf:checkboxrow rowtype="fullWidth noLabel">
					<xf:option name="delete">
						<xf:label>{{ phrase('this_is_last_position_for_this_widget_permanently_delete') }}</xf:label>
					</xf:option>
				</xf:checkboxrow>
			</div>
		<xf:elseif is="!$positionId AND count($widget.positions)" />
			<div class="block-row">
				<div class="blockMessage blockMessage--close blockMessage--warning blockMessage--iconic blockMessage--iconic">
					{{ phrase('this_widget_is_currently_used_in_x_positions', {'positions': count($widget.positions)}) }}
				</div>
			</div>
		</xf:if>
		<xf:submitrow rowtype="simple" icon="delete" />
	</div>
</xf:form>