<!--
  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.
-->
<div class="container-fluid">
    <div class="row">
        <div class="col-md-4">
            <br-card>
                <br-card-content class="entity-tree">
                    <div class="entity-tree-header">
                        <div class="entity-tree-header-section">
                            <h2 class="entity-tree-title">Applications</h2>
                            <button class="btn btn-sm btn-default entity-tree-sort-action" ng-click="ctrl.toggleSortOrder($event)">
                                <div>
                                    <span class="glyphicon" ng-class="ctrl.sortReverse ? 'fa fa-sort-amount-desc' : 'fa fa-sort-amount-asc'"></span>
                                </div>
                            </button>
                        </div>
                        <div class="entity-tree-header-section">
                            <button class="btn btn-link entity-tree-action"
                                ng-class="{'btn-sm': !ctrl.isNotificationsBlocked, 'btn-xs': ctrl.isNotificationsBlocked}"
                                ng-if="ctrl.isNotificationsSupported"
                                ng-disabled="ctrl.isNotificationsBlocked"
                                ng-click="ctrl.toggleNotifications()">
                                <i class="fa fa-bell notifications" ng-if="!ctrl.isNotificationsBlocked"
                                   ng-class="{'active': ctrl.isNotificationsEnabled}"></i>
                                <span class="fa-stack" ng-if="ctrl.isNotificationsBlocked"
                                      uib-tooltip="Notifications are currently blocked. You can allow them in your browser settings"
                                      tooltip-placement="left">
                                    <i class="fa fa-bell fa-stack-1x"></i>
                                    <i class="fa fa-ban fa-stack-2x text-danger"></i>
                                </span>
                            </button>
                            <a href="/brooklyn-ui-blueprint-composer" class="btn btn-sm btn-default entity-tree-action">
                                <i class="fa fa-plus"></i>
                            </a>
                        </div>
                    </div>

                    <entity-tree sort-reverse="ctrl.sortReverse"></entity-tree>
                </br-card-content>
            </br-card>

        </div>

        <div class="col-md-8">
            <ui-view>
                <h3 class="text-center text-muted">Select an entity on the left</h3>
            </ui-view>
        </div>
    </div>
</div>
