{#
 # For the full copyright and license information, please view the
 # docs/licenses/LICENSE.txt file that was distributed with this source code.
 #}
{% if this.showNewOrders or this.showNewCustomers or this.showNewMessages %}
  <div class="component header-right-component" id="header-notifications-container">
    <div id="notif" class="notification-center dropdown dropdown-clickable">
      <button class="btn notification js-notification dropdown-toggle" data-toggle="dropdown">
        <i class="material-icons">notifications_none</i>
        <span id="notifications-total" class="count hide">0</span>
      </button>
      <div class="dropdown-menu dropdown-menu-right js-notifs_dropdown">
        <div class="notifications">
          <ul class="nav nav-pills" role="tablist">
            {% set active = 'active' %}
            {% if this.showNewOrders %}
              <li class="nav-item">
                <a
                  class="nav-link {{ active }}"
                  id="orders-tab"
                  data-toggle="tab"
                  data-type="order"
                  href="#orders-notifications"
                  role="tab"
                >
                  {{ 'Orders[1][/1]'|trans({'[1]': '', '[/1]': ''}, 'Admin.Navigation.Notification')|raw_purified }}
                  <span id="_nb_new_orders_"></span>
                </a>
              </li>
              {% set active = '' %}
            {% endif %}
            {% if this.showNewCustomers %}
              <li class="nav-item">
                <a
                  class="nav-link {{ active }}"
                  id="customers-tab"
                  data-toggle="tab"
                  data-type="customer"
                  href="#customers-notifications"
                  role="tab"
                >
                  {{ 'Customers[1][/1]'|trans({'[1]': '', '[/1]': ''}, 'Admin.Navigation.Notification') }}
                  <span id="_nb_new_customers_"></span>
                </a>
              </li>
              {% set active = '' %}
            {% endif %}
            {% if this.showNewMessages %}
              <li class="nav-item">
                <a
                  class="nav-link {{ active }}"
                  id="messages-tab"
                  data-toggle="tab"
                  data-type="customer_message"
                  href="#messages-notifications"
                  role="tab"
                >
                  {{ 'Messages[1][/1]'|trans({'[1]': '', '[/1]': ''}, 'Admin.Navigation.Notification') }}
                  <span id="_nb_new_messages_"></span>
                </a>
              </li>
              {% set active = '' %}
            {% endif %}
          </ul>

          <!-- Tab panes -->
          <div class="tab-content">
            {% set active = 'active' %}
            {% if this.showNewOrders %}
              <div class="tab-pane {{ active }} empty" id="orders-notifications" role="tabpanel">
                <p class="no-notification">
                  {{ 'No new order for now :('|trans({}, 'Admin.Navigation.Notification') }}<br>
                  {{ this.noOrderTip|raw }}
                </p>
                <div class="notification-elements"></div>
              </div>
              {% set active = '' %}
            {% endif %}
            {% if this.showNewCustomers %}
              <div class="tab-pane {{ active }} empty" id="customers-notifications" role="tabpanel">
                <p class="no-notification">
                  {{ 'No new customer for now :('|trans({}, 'Admin.Navigation.Notification') }}<br>
                  {{ this.noCustomerTip }}
                </p>
                <div class="notification-elements"></div>
              </div>
              {% set active = '' %}
            {% endif %}
            {% if this.showNewMessages %}
              <div class="tab-pane {{ active }} empty" id="messages-notifications" role="tabpanel">
                <p class="no-notification">
                  {{ 'No new message for now.'|trans({}, 'Admin.Navigation.Notification') }}<br>
                  {{ this.noCustomerMessageTip }}
                </p>
                <div class="notification-elements"></div>
              </div>
              {% set active = '' %}
            {% endif %}
          </div>
        </div>
      </div>
    </div>

    {% if this.showNewOrders %}
      <script type="text/html" id="order-notification-template">
        <a class="notif" href="order_url">
          <span class="notif__id">#_id_order_</span>
          <span class="notif__customer">
           - {{ 'From:'|trans({}, 'Admin.Navigation.Notification') }} <strong>_customer_name_</strong> <span class="notif__iso">(_iso_code_)</span>
          </span>
          <span class="notif__order-info">
           <span class="notif__carrier"> _carrier_ -</span> <strong class="notif__total">_total_paid_</strong>
          </span>
        </a>
      </script>
    {% endif %}

    {% if this.showNewCustomers %}
      <script type="text/html" id="customer-notification-template">
        <a class="notif" href='customer_url'>
          <span class="notif__id">#_id_customer_</span>
          <span class="notif__customer">
           - <strong>_customer_name_</strong> _company_ -
          </span>
          <span class="notif__registered-date">
            {{ 'Registered on:'|trans({}, 'Admin.Navigation.Notification') }} <strong>_date_add_</strong>
          </span>
        </a>
      </script>
    {% endif %}

    {% if this.showNewMessages %}
      <script type="text/html" id="message-notification-template">
        <a class="notif" href='message_url'>
          <span class="notif__status _status_">
            <i class="material-icons">fiber_manual_record</i> _status_
          </span>
          <span class="notif__customer">
           - <strong>_customer_name_</strong> _company_ -
          </span>
          <span class="notif__date">
            <i class="material-icons">access_time</i> _date_add_
          </span>
        </a>
      </script>
    {% endif %}
  </div>
{% endif %}
