<mvc:View
	xmlns="sap.m"
	xmlns:mvc="sap.ui.core.mvc"
	xmlns:f="sap.f"
	xmlns:v="sap.ui.fl.variants"
	xmlns:macro="sap.fe.macros"
	xmlns:core="sap.ui.core"
	xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
	xmlns:unittest="http://schemas.sap.com/sapui5/preprocessorextension/sap.fe.unittesting/1"
	xmlns:customData="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"
	template:require="{
		macroLibrary: 'sap/fe/macros/macroLibrary',
		CORE: 'sap/fe/core/AnnotationHelper',
		ID: 'sap/fe/macros/StableIdHelper',
		COMMON: 'sap/fe/macros/CommonHelper'
	}"
	controllerName="sap.fe.templates.ListReport.ListReportController">

	<template:with path="entitySet>" helper="CORE.getPresentationContext" var="annotationPath">
		<f:DynamicPage unittest:id="listReportFooterTest"
					   customData:reportTableId="{= ID.generate(['fe', 'table', ${entitySet>@sapui.name}, ${annotationPath>@sapui.name}.replace(RegExp('.*\\.'), '')]) }"
					   showFooter="{= CORE.hasDeterminingActions(${entitySet>./@})}">
			<f:title>
				<f:DynamicPageTitle>
					<f:heading>
						<Title unittest:id="listReportTitleTest" text="{= ${manifest>/sap.app/appSubTitle} || ${manifest>/sap.app/title} }" />
					</f:heading>
					<f:snappedContent>
						<Text text="{sap.fe.templates.ListReport>/filterSummary}"></Text>
					</f:snappedContent>
				</f:DynamicPageTitle>
			</f:title>
			<f:header>
				<f:DynamicPageHeader pinnable="true">
					<macro:FilterBar
						unittest:id="listReportFilterBarTest"
						id="{= COMMON.getStableId(['fe', 'fb', ${entitySet>@sapui.name}]) }"
						metadataContexts="{model: 'entitySet', path:'',  name: 'entitySet'}"
						listBindingNames="{= COMMON.getStableId(['fe', 'table', ${entitySet>@sapui.name}, ${annotationPath>@sapui.name}.replace(RegExp('.*\\.'), '')]) }"
						search=".handlers.onSearch"
						filtersChanged=".handlers.onFiltersChanged"
						draftEditStateModelName="{= (${entitySet>@com.sap.vocabularies.Common.v1.DraftRoot} || ${entitySet>@com.sap.vocabularies.Common.v1.DraftNode}) ? '$draft' : '' }"
						liveMode="{viewData>/liveMode}"
					/>
				</f:DynamicPageHeader>
			</f:header>
			<f:content>
				<core:Fragment fragmentName="sap.fe.controls.ViewSwitchContainer.ViewSwitchContainer" type="XML"/>
			</f:content>
			<f:footer>
				<OverflowToolbar unittest:id="listReportOverflowToolbarTest" id="{= ID.generate(['fe','lr', 'footer', ${entitySet>@sapui.name}] )}" visible="{=  CORE.showFooter(${entitySet>$Type@com.sap.vocabularies.UI.v1.LineItem},false) }">
					<template:with path="entitySet>./" var="entityType">
					<ToolbarSpacer />
						<template:repeat list="{entityType>./@com.sap.vocabularies.UI.v1.LineItem}" var="dataField">
							<template:if test="{= !(${dataField>./@com.sap.vocabularies.UI.v1.Hidden} === true) }">
							   <template:if test="{= ${dataField>$Type} === 'com.sap.vocabularies.UI.v1.DataFieldForAction' &amp;&amp; ${dataField>Determining} === true}">
								  <Button
									id="{= ID.generate(['fe','lr', 'footer', ${entitySet>@sapui.name}, ${dataField>Action}] )}"
									text="{dataField>Label}"
									press="{= '.transaction.onCallAction(\'' + ${dataField>Action} + '\',
									{ model: ${$source>}.getModel(), label: \'' + ${dataField>Label} + '\'})'}"
									visible="{= ${dataField>./@com.sap.vocabularies.UI.v1.Hidden} === false ? true : %{dataField>./@com.sap.vocabularies.UI.v1.Hidden@@MODEL.value} &amp;&amp;'{= !%' + %{dataField>./@com.sap.vocabularies.UI.v1.Hidden@@MODEL.value} + '}' }"
									hideText="false" importance="Medium" type="Default"/>
							   </template:if>
							</template:if>
						</template:repeat>
					</template:with>
				</OverflowToolbar>
			</f:footer>
		</f:DynamicPage>
	</template:with>
</mvc:View>