<core:FragmentDefinition
	xmlns="sap.m"
	xmlns:core="sap.ui.core"
	xmlns:l="sap.ui.layout">
	<Table
		id="results"
		width="auto"
		class="sapUiSmallMargin"
		mode="SingleSelectMaster"
		selectionChange=".onSelectionChange"
		items="{
			path: 'groups/0/icons',
			sorter: {
				path: 'name',
				descending: false
			},
			templateShareable: true
		}"
		noDataText="{view>/overviewNoDataText}"
		growing="true"
		growingScrollToLoad="true"
		growingThreshold="{view>/growingThreshold}"
		updateFinished=".onUpdateFinished">

		<columns>
			<Column id="iconColumn" width="2rem" vAlign="Middle">
				<Text id="iconColumnTitle" text="{i18n>tableIconColumnTitle}"/>
			</Column>
			<Column id="nameColumn" width="20%" vAlign="Middle">
				<Text id="nameColumnTitle" text="{i18n>tableNameColumnTitle}"/>
			</Column>
			<Column
				id="codeColumn"
				width="20%"
				minScreenWidth="Tablet"
				demandPopin="true"
				vAlign="Middle">
				<Text id="codeColumnTitle" text="{i18n>tableCodeColumnTitle}"/>
			</Column>
			<Column
				id="tagsColumn"
				width="35%"
				minScreenWidth="Desktop"
				demandPopin="true"
				vAlign="Middle">
				<Text id="tagsColumnTitle" text="{i18n>tableTagsColumnTitle}"/>
			</Column>
			<Column id="favColumn" width="2rem" vAlign="Middle"/>
		</columns>

		<items>
			<ColumnListItem
				type="Active">
				<cells>
					<core:Icon size="2rem" src="sap-icon://{view>/iconPath}{name}" color="Default" useIconTooltip="false"/>
					<Label design="Bold" text="{name}"/>
					<Text text="sap-icon://{view>/iconPath}{name}"/>
					<l:HorizontalLayout
						content="{
							path: 'tags',
							templateShareable: true
						}"
						allowWrapping="true">
						<Token text="{name}" select=".onTagSelect" editable="false"/>
					</l:HorizontalLayout>
					<RatingIndicator
						iconUnselected="sap-icon://unfavorite"
						value="{
							path: 'name',
							formatter: '.formatter.favoriteRating'
						}"
						maxValue="1"
						change=".onToggleFavorite"/>
				</cells>
			</ColumnListItem>
		</items>
	</Table>
</core:FragmentDefinition>