<core:FragmentDefinition xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1"
						 xmlns="sap.m"
						 xmlns:core="sap.ui.core"
						 xmlns:dt="sap.ui.dt">

	<VBox id="header::{path: 'headerFacet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::RatingIndicatorVBox"
		  binding="{parts: [{path: 'headerFacet>Target'}, {path: 'entitySet>'}], formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getNavigationPathWithExpand'}"
		  visible="{= ${path: 'headerFacet>com.sap.vocabularies.UI.v1.Hidden'} ? ${path: 'headerFacet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getBindingForHiddenPath'} : true}"
		  dt:annotation="{parts: [{path: 'parameter>/entityType'}, {value: 'com.sap.vocabularies.UI.v1.HeaderFacets'}, {path: 'headerFacet>Target/AnnotationPath'}, {path: 'headerFacet>'}], formatter: 'sap.suite.ui.generic.template.changeHandler.js.AnnotationHelperForDesignTime.createInstanceMetadataWithPath'}">
		<items>
			<Title id="header::{path: 'headerFacet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::RatingIndicatorTitle"
				   text="{path: 'dataPoint>Title', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"
				   class="sapSmartTemplatesObjectPageHeaderMiniChartTitle"/>
				<Label id="header::{path: 'headerFacet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::RatingIndicatorSubTitle"
					   text="{= ${dataPoint>SampleSize} ? ${path: 'dataPoint>SampleSize', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.buildRatingIndicatorSubtitleExpression'} : ${path: 'dataPoint>Description', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}}"
					   visible="{= (${dataPoint>SampleSize} || ${dataPoint>Description}) ? true : false}"
					   class="sapSmartTemplatesObjectPageHeaderMiniChartSubTitle">
						<template:with path="dataPoint>SampleSize" helper="sap.ui.model.odata.AnnotationHelper.resolvePath" var="sampleSizeTarget">
							<template:if test="{= ${dataPoint>SampleSize} &amp;&amp; ${sampleSizeTarget>com.sap.vocabularies.Common.v1.Label}}">
								<template:then>
									<customData>
										<core:CustomData key="Subtitle" value="{path: 'sampleSizeTarget>com.sap.vocabularies.Common.v1.Label', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"/>
									</customData>
								</template:then>
							</template:if>
						</template:with>
				</Label>
			<template:if test="{= ${parameter>/isFiori3Enabled}}">
				<template:then>
					<RatingIndicator id="header::{path: 'headerFacet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::RatingIndicator"
									 enabled="true" editable="false"
									 maxValue="{path: 'dataPoint>TargetValue', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"
									 value="{path: 'dataPoint>Value', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"
									 iconSize="1.375rem"
									 class="sapUiTinyMarginTopBottom" />
				</template:then>
				<template:else>
					<RatingIndicator id="header::{path: 'headerFacet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::RatingIndicator"
									 enabled="false"
									 maxValue="{path: 'dataPoint>TargetValue', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"
									 value="{path: 'dataPoint>Value', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"
									 iconSize="1.375rem" />
				</template:else>
			</template:if>
			<Label id="header::{path: 'headerFacet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::RatingIndicatorFooter"
				   text="{parts:[{path: 'dataPoint>Value'}, {path: 'dataPoint>TargetValue'}], formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.buildRatingIndicatorFooterExpression'}"
				   visible="{= ${dataPoint>SampleSize} ? true : false }">
					<template:if test="{= ${dataPoint>TargetValue} &amp;&amp; !${dataPoint>TargetValue/Path}}">
						<template:then>
							<customData>
								<core:CustomData key="Footer" value="{path: 'dataPoint>TargetValue', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"/>
							</customData>
						</template:then>
					</template:if>
			</Label>
		</items>
	</VBox>
</core:FragmentDefinition>
