<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:layout="sap.ui.layout" xmlns:f="sap.f">
	<template:with path="facet>Target" var="target">
		<template:with path="target>"
					   helper="sap.ui.model.odata.AnnotationHelper.resolvePath" var="contact">
			<VBox class="sapSmartTemplatesObjectPageContactsListContainer" 
				visible="{= ${path: 'facet>com.sap.vocabularies.UI.v1.Hidden'} ? ${path: 'facet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getBindingForHiddenPath'} : true}">
				<layoutData>
					<layout:GridData id="{path: 'facet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::ContactsList::GridData" span="XL12 L12 M12 S12" />
				</layoutData>
				<items>
					<List id="{path: 'facet>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getStableIdPartFromFacet'}::ContactsList"
						  items="{path: 'target>', formatter: 'sap.ui.model.odata.AnnotationHelper.getNavigationPath'}"
						  growing="true" growingThreshold="12" class="sapSmartTemplatesObjectPageContactsList"
						  noDataText="{i18n>NOITEMS}">
						<CustomListItem class="sapSmartTemplatesObjectPageContactsListItem">
							<HBox>
								<template:if test="{contact>photo}">
									<template:then>
										<f:Avatar
											src="{path: 'contact>photo', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"
											displaySize="S"
											displayShape="Square"
											class="sapUiSmallMarginTopBottom"/>
											
									</template:then>
									<template:else>
										<core:Icon size="2rem"
												   src="sap-icon://person-placeholder"
												   alt=" "
												   class="sapUiSmallMarginTopBottom sapSmartTemplatesObjectPageContactsImage"/>
									</template:else>
								</template:if>
								<VBox class="sapUiSmallMarginBegin sapUiSmallMarginTopBottom">
									<Link text="{path: 'contact>fn', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"
										  press="._templateEventHandlers.onContactDetails" class="sapSmartTemplatesObjectPageContactsListContactTitle"
										  wrapping="true">
										  <customData>
								<core:CustomData key="contactDetails" value="{= ${path: 'contact>', formatter: 'sap.suite.ui.generic.template.js.AnnotationHelper.getCustomDataForContactPopup'}}"/>
							</customData> 	
									</Link>
									<Text text="{path: 'contact>role', formatter: 'sap.ui.model.odata.AnnotationHelper.format'}"
										  class="sapSmartTemplatesObjectPageContactsListContactSubTitle"/>
								</VBox>
							</HBox>
						</CustomListItem>
					</List>
				</items>
			</VBox>
		</template:with>
	</template:with>
</core:FragmentDefinition>
