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

	<VBox id="header::{path: 'headerFacet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::PlainTextVBox"
		  displayInline="true" class="sapSmartTemplatesObjectPageHeaderPlainText"
		  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'}">
		<template:if test="{headerFacet>Label}">
			<Text id="header::{path: 'headerFacet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::PlainTextLabel"
				  text="{path: 'headerFacet>Label', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}" class="sapSmartTemplatesObjectPageHeaderPlainTextTitle"/>
		</template:if>
		<template:with path="form>Data/0/" var="dataField"> <!-- There should only be 1 datafield -->
			<template:if test="{= ${dataField>RecordType} === 'com.sap.vocabularies.UI.v1.DataField'}">
				<Text id="header::{path: 'headerFacet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::{path: 'dataField>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromDataField'}::PlainTextDataField"
					  text="{path: 'dataField>Value', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"
					  class="sapSmartTemplatesObjectPageHeaderPlainTextField sapUiTinyMarginEnd"/>
			</template:if>
		</template:with>
	</VBox>
</core:FragmentDefinition>
