<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
-->

<header>
    <nav class="navbar navbar-mode">
        <div class="container-fluid flush-left">
            <ul class="nav navbar-nav navbar-nav-mode">
                <li ng-class="{'active': vm.isGraphicalMode()}">
                    <a ui-sref="main.graphical" ng-disabled="vm.parseError">
                        <i class="fa fa-fw fa-object-group"></i> Graphical Designer
                    </a>
                </li>
                <li ng-class="{'active': !vm.isGraphicalMode()}">
                    <a ui-sref="main.yaml">
                        <i class="fa fa-fw fa-pencil"></i> YAML Editor
                    </a>
                </li>
            </ul>

            <div class="nav navbar-form navbar-right navbar-nav-main-actions">
                <custom-action ng-repeat="(id, action) in vm.getAllActions() track by id" action="action"></custom-action>
                <blueprint-data-manager></blueprint-data-manager>
            </div>

            <ul class="nav navbar-nav navbar-right navbar-nav-secondary-actions" ng-if="vm.isGraphicalMode()" >
                <li class="dropdown" uib-dropdown>
                    <a href class="dropdown-toggle" uib-dropdown-toggle aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-fw fa-clone"></i> Layers <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-right" uib-dropdown-menu role="menu">
                        <li role="menuitem" class="layer"
                            ng-if="vm.isGraphicalMode()"
                            ng-repeat="layer in vm.layers track by layer.id"
                            ng-class="{'active': layer.active}">
                            <a ng-click="layer.active = !layer.active"><i class="fa fa-fw fa-circle"></i> {{layer.label}}</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
</header>

<ui-view></ui-view>

