<nav id="kc-navigation" class="navbar" role="navigation">
    <div class="navbar-header">
    		<div class="container">
		        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse-1">
		            <span class="sr-only">Toggle navigation</span>
		            <span class="icon-bar"></span>
		            <span class="icon-bar"></span>
		            <span class="icon-bar"></span>
		        </button>
		        <h1 class="navbar-title">Keycloak</h1>
    		</div>
    </div>
    <div class="collapse navbar-collapse navbar-collapse-1">
    		<div class="container">
		        <ul class="nav navbar-nav navbar-utility" data-ng-show="auth.user">
		            <li class="dropdown">
		                <a data-toggle="dropdown" class="dropdown-toggle" href="#">
		                    <span class="pficon pficon-user"></span>
		                    {{auth.user.displayName}}<b class="caret"></b>
		                </a>
		                <ul class="dropdown-menu">
		                    <li><a href="{{authUrl}}/realms/{{auth.user.realm}}/account?referrer=security-admin-console">Manage Account</a></li>
		                    <li data-ng-show="auth.hasAnyAccess"><a href="#/server-info">Server Info</a></li>
		                    <li class="separator"><a href="" ng-click="auth.authz.logout()">Sign Out</a></li>
		                </ul>
		            </li>
		        </ul>
		        <ul class="nav navbar-nav navbar-primary persistent-secondary" data-ng-controller="RealmDropdownCtrl">
		            <li class="dropdown context" data-ng-show="showNav()">
		                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
		                    {{current.realm.realm}}
		                    <b class="caret"></b>
		                </a>
		                <ul class="dropdown-menu" data-ng-show="current.realms.length > 1">
		                    <li data-ng-repeat="realm in current.realms" data-ng-if="realm.realm != current.realm.realm">
		                        <a href="" ng-click="changeRealm(realm.realm)">{{realm.realm}}</a>
		                    </li>
		                </ul>
		            </li>
		            <li class="active pull-right" data-ng-show="auth.user && access.createRealm">
		                <a class="button primary" href="#/create/realm" data-ng-class="path[0] == 'create' && path[1] == 'realm' && 'active'"
		                   data-ng-show="auth.user">Add Realm</a>
		            </li>
		        </ul>
    		</div>
    </div>
</nav>
<!-- TODO remove once this page is properly styled -->
<style type="text/css">
    .icon-spinner6 {
        cursor: pointer;
    }
</style>