<core:FragmentDefinition
		xmlns="sap.m"
		xmlns:core="sap.ui.core">
	<Dialog
			title="{i18n>CHANGE_VERSION_DIALOG_TITLE}"
			contentHeight="400px"
			stretch="{appView>/bPhoneSize}">
		<buttons>
			<Button
				text="{i18n>CHANGE_VERSION_DIALOG_APPLY_BTN}"
				type="Emphasized"
				press=".onVersionItemPress">
			</Button>
			<Button
					text="{i18n>CHANGE_VERSION_DIALOG_LATEST_BTN}"
					type="Ghost"
					press=".onLatestVersionItemPress">
			</Button>
			<Button
					text="{i18n>CHANGE_VERSION_DIALOG_CLOSE_BTN}"
					press=".onCloseVersionDialog">
			</Button>
		</buttons>
		<subHeader>
			<Bar>
				<contentMiddle>
					<SearchField
							liveChange=".onChangeVersionDialogSearch"
							showSearchButton="false">
					</SearchField>
				</contentMiddle>
			</Bar>
		</subHeader>
		<Tree
				id="versionList"
				mode="SingleSelectMaster"
				items="{
					path: '/',
					sorter: [{
						path: 'groupTitle',
						descending: true,
						group: true,
						comparator: '.versionSwitchCustomComparator'
					}, {
						path: 'patchVersion',
						descending: true
					}]
				}">
			<StandardTreeItem
					title="{path: 'version'}{= ${path: 'version'} === ${versionData>/latestVersion} ? ' (Latest)' : ''}">
				<customData>
					<core:CustomData key="path" value="{path: 'path'}" />
				</customData>
			</StandardTreeItem>
		</Tree>
	</Dialog>
</core:FragmentDefinition>
