<template name="sideNav">
	<aside class="side-nav primary-background-color color-tertiary-font-color" role="navigation">
		<header class="header">
			{{> accountBox }}
		</header>
		{{#if currentUser}}
			{{> toolbar}}
			<div class="unread-rooms background-primary-action-color color-primary-action-contrast top-unread-rooms hidden">
				{{_ "More_unreads"}} <i class="icon-up-big"></i>
			</div>
			<div class="rooms-list" aria-label="{{_ "Channels"}}" role="region">
				<div class="wrapper">
					{{> unreadRooms }}

					{{#each roomType}}
						{{#if canShowRoomType}}
							{{> Template.dynamic template=templateName }}
						{{/if}}
					{{/each}}

					{{#if canViewHistory}}
						<h3 class="history-div">
							<a href="{{pathFor 'privateHistory'}}">{{_ "History"}}</a>
						</h3>
					{{/if}}
				</div>
			</div>
			<div class="unread-rooms background-primary-action-color color-primary-action-contrast bottom-unread-rooms hidden">
				{{_ "More_unreads"}} <i class="icon-down-big"></i>
			</div>
			<div class="flex-nav primary-background-color animated-hidden">
				<section>
					{{> Template.dynamic template=flexTemplate data=flexData}}
				</section>
			</div>
			<span class="arrow bottom"></span>
		{{/if}}
		<footer class="footer">
			{{{footer}}}
		</footer>
	</aside>
</template>
