.diff-panel.full-size(
	ng-if="history.isV2 && history.viewMode === HistoryViewModes.COMPARE"
	ng-controller="HistoryV2DiffController"
)
	.diff(
		ng-if="!!history.diff && !history.diff.loading && !history.diff.error",
		ng-class="{ 'diff-binary': history.diff.binary }"
	)
		.toolbar.toolbar-alt
			span.name(ng-if="history.diff.binary")
				strong {{history.diff.pathname}}
			span.name(ng-if="!history.diff.binary")
				| <strong>{{history.diff.highlights.length}} </strong>
				ng-pluralize(
					count="history.diff.highlights.length",
					when="{\
						'one': 'change',\
						'other': 'changes'\
					}"
				)
				|  in <strong>{{history.diff.pathname}}</strong>
			.history-toolbar-btn(
				ng-click="toggleHistoryViewMode();"
			) 
				i.fa
				| #{translate("view_single_version")}
			.toolbar-right(ng-if="history.selection.docs[history.selection.pathname].deletedAtV")
				button.btn.btn-danger.btn-xs(
					ng-click="restoreDeletedFile()"
					ng-show="!restoreState.error"
					ng-disabled="restoreState.inflight"
				)
					i.fa.fa-fw.fa-step-backward
					span(ng-show="!restoreState.inflight")
						| Restore this deleted file
					span(ng-show="restoreState.inflight")
						| Restoring...
				span.text-danger(ng-show="restoreState.error")
					| Error restoring, sorry
		.diff-editor.hide-ace-cursor(
			ng-if="!history.diff.binary"
			ace-editor="history",
			theme="settings.theme",
			font-size="settings.fontSize",
			text="history.diff.text",
			highlights="history.diff.highlights",
			read-only="true",
			resize-on="layout:main:resize",
			navigate-highlights="true"
		)
		.alert.alert-info(ng-if="history.diff.binary")
			| We're still working on showing image and binary changes, sorry. Stay tuned!

	.loading-panel(ng-show="history.diff.loading")
		i.fa.fa-spin.fa-refresh
		| &nbsp;&nbsp;#{translate("loading")}...
	.error-panel(ng-show="history.diff.error")
		.alert.alert-danger #{translate("generic_something_went_wrong")}

.point-in-time-panel.full-size(
	ng-if="history.isV2 && history.viewMode === HistoryViewModes.POINT_IN_TIME"
)
	.point-in-time-editor-container(
		ng-if="!!history.selectedFile && !history.selectedFile.loading && !history.selectedFile.error"
	)
		.hide-ace-cursor(
			ng-if="!history.selectedFile.binary"
			ace-editor="history-pointintime",
			theme="settings.theme",
			font-size="settings.fontSize",
			text="history.selectedFile.text",
			read-only="true",
			resize-on="layout:main:resize",
		)
		.alert.alert-info(ng-if="history.selectedFile.binary")
			| We're still working on showing image and binary changes, sorry. Stay tuned!
	.loading-panel(ng-show="history.selectedFile.loading")
		i.fa.fa-spin.fa-refresh
		| &nbsp;&nbsp;#{translate("loading")}...
	.error-panel(ng-show="history.selectedFile.error")
		.alert.alert-danger #{translate("generic_something_went_wrong")}
