<core:FragmentDefinition
	xmlns="sap.m"
	xmlns:core="sap.ui.core"
	xmlns:scenario="sap.ui.core.sample.ViewTemplate.scenario"
	xmlns:template="http://schemas.sap.com/sapui5/extension/sap.ui.core.template/1">
	<scenario:Form binding="{path: 'facet>Target', formatter: 'AH.getNavigationPath'}"
		title="{path: 'facet>Label', formatter: 'AH.format'}">
		<core:ExtensionPoint name="afterTitle"/>
		<template:with path="facet>Target" helper="AH.resolvePath" var="target">
			<template:if test="{:= Array.isArray(${target>Data}) }">
				<template:then><!-- e.g. com.sap.vocabularies.UI.v1.FieldGroup -->
					<!-- ignore target>Label in favor of facet>Label -->
					<template:repeat list="{target>Data}" var="field">
						<core:Fragment fragmentName="sap.ui.core.sample.ViewTemplate.scenario.LabeledField" type="XML"/>
					</template:repeat>
				</template:then>
				<template:else><!-- e.g. com.sap.vocabularies.UI.v1.StatusInfo or com.sap.vocabularies.UI.v1.Badge -->
					<template:repeat list="{target>}" var="field">
						<core:Fragment fragmentName="sap.ui.core.sample.ViewTemplate.scenario.LabeledField" type="XML"/>
					</template:repeat>
				</template:else>
			</template:if>
		</template:with>
	</scenario:Form>
</core:FragmentDefinition>