<core:FragmentDefinition
	xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
	template:require="sap.suite.ui.generic.template.js.AnnotationHelperMultipleViews"
	xmlns="sap.m" xmlns:core="sap.ui.core" xmlns:build="sap.build">

	<IconTabBar class="sapUiResponsiveContentPadding" id="{:= ${parameter>/stableId}.getStableId({type: 'QuickVariantSelectionX', subType: 'IconTabBar'})}"
		 expandable="false" stretchContentHeight="true" headerMode="Inline" selectedKey="{_templPriv>/listReport/multipleViews/selectedKey}">
		<items>
			<template:repeat list="{parameter>/settings/quickVariantSelectionX/variants}" var="tabItem">
				<IconTabFilter id="{:= ${parameter>/stableId}.getStableId({type: 'QuickVariantSelectionX', subType: 'IconTabFilter', sQuickVariantKey: ${tabItem>key}})}"
							   key="{path: 'tabItem>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getIconTabFilterKey'}"
							   text="{parts: [{path: 'parameter>/settings/quickVariantSelectionX'}, {path: 'tabItem>'}], formatter: 'sap.suite.ui.generic.template.js.AnnotationHelperMultipleViews.getTextForItem'}">
				</IconTabFilter>
			</template:repeat>
		</items>
		<content>
			<MessageStrip
				id="listReportFilterMessage"
				text="{_templPriv>/listReport/multipleViews/finalMessage}"
				type="Information" showIcon="true" showCloseButton="true" class="sapUiSmallMargin"
				visible="{_templPriv>/listReport/multipleViews/msgVisibility}"
				close="._templateEventHandlers.onMessageCloseActionPress">
			</MessageStrip>
			<template:repeat list="{parameter>/settings/quickVariantSelectionX/variants}" var="tabItem">
				<template:with path="tabItem>" helper="sap.suite.ui.generic.template.ListReport.AnnotationHelper.getEntityType" var="entityType">
					<template:with path="tabItem>" helper="sap.suite.ui.generic.template.ListReport.AnnotationHelper.getEntitySet" var="entitySet">
						<template:if test="{parts:[{path: 'entityType>'}, {path: 'tabItem>'}],  formatter: 'sap.suite.ui.generic.template.ListReport.AnnotationHelper.checkIfSmartChart'}">
							<template:then>
								<template:with path="tabItem>" helper="sap.suite.ui.generic.template.ListReport.AnnotationHelper.getChartAnnotationPath" var="chartAnnotationPath">
									<template:with path="entitySet>dummy" var="facet">
										<core:Fragment fragmentName="sap.suite.ui.generic.template.ListReport.view.fragments.SmartChart" type="XML" />
									</template:with>
								</template:with>
							</template:then>
						<template:else>
							<template:with path="tabItem>" helper="sap.suite.ui.generic.template.ListReport.AnnotationHelper.getTableAnnotationPath" var="tableAnnotationPath">
								<core:Fragment fragmentName="sap.suite.ui.generic.template.ListReport.view.fragments.SmartTable" type="XML" />
							</template:with>
						</template:else>
						</template:if>
					</template:with>
				</template:with>
			</template:repeat>
		</content>
	</IconTabBar>
</core:FragmentDefinition>
