<link href="templates/rows/style.css" rel="stylesheet">
<div class="content" ng-init="itemsCount = 5">
	<div class="content image" ng-if="!fullscreenImage" ng-style="{'background-image': 'url(' + backgroundImage + ')'}" ng-init="">
		<div class="orders" ng-class="{fullscreen: orders.length - orders.lengthCompleted > itemsCount || orders.lengthCompleted > itemsCount + 1}">
			<div class="orders-container">
				<div class="circle" ng-repeat="order in orders | filter: {completed: true} | limitTo: 1">
					<div class="order-number">{{order.number}}</div>
				</div>
				<div class="row order-numbers">
					<div class="order completed order-size" ng-repeat="order in orders | filter: {completed: true} | limitTo: itemsCount + itemsCount*(orders.length - orders.lengthCompleted > itemsCount || orders.lengthCompleted > itemsCount + 1) : 1">
						{{order.number}}
					</div>
				</div>
				<div class="row in-progress">Готовятся</div>
				<div class="row order-numbers in-progress">
					<div class="order order-size" ng-repeat="order in orders | filter: {completed: false} | limitTo: itemsCount + itemsCount*(orders.length - orders.lengthCompleted > itemsCount || orders.lengthCompleted > itemsCount + 1)">
						{{order.number}}
					</div>
				</div>
			</div>
		</div>
		<div class="orders fullheight inline" ng-if="orders.length - orders.lengthCompleted <= itemsCount && orders.lengthCompleted <= itemsCount + 1">
			<div class="image" ng-if="!isVideo(image)" ng-style="{'background-image': 'url(' + image + ')'}"></div>
			<video class="video" ng-if="isVideo(image)">
				<source src="{{image}}" type="video/mp4" ng-if="isVideo(image)">
				Your browser does not support the video tag.
			</video>
		</div>
	</div>
	<div class="image" ng-if="fullscreenImage && !isVideo(fullscreenImage)" ng-style="{'background-image': 'url(' + fullscreenImage + ')'}"></div>
	<video class="video" ng-if="fullscreenImage && isVideo(fullscreenImage)">
		<source src="{{fullscreenImage}}" type="video/mp4" ng-if="fullscreenImage && isVideo(fullscreenImage)">
		Your browser does not support the video tag.
	</video>
	<div class="title-bar" ng-click="showOrder()">
		<div class="logo" ng-style="{'background-image': 'url(' + logoImage + ')'}"></div>
		<div class="time">{{time | date: 'HH:mm'}}</div>
	</div>
</div>
