<!DOCTYPE html>
{% for lang in site['languages'] %}
{% if lang['active'] %}
<html lang="{{ lang['code'] }}">
{% endif %}
{% endfor %}
<head>
    <base href="{{ site['url'] }}/">
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>{{ title }}</title>
  <meta name="keywords" content="{{ keywords }}">
  <meta name="description" content="{{ description }}">
      {% for style in styleList %}
    <link rel="stylesheet" type="text/css" href="{{ style }}">
    {% endfor %}
  <link rel="stylesheet" type="text/css" href="https://cdn.mypanel.link/css/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
  <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.css'>
  <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.css'>
  
</head>

{% if user['auth'] %}
<body id="userwapinuser">
  <nav class="usernav navbar navbar-default navbar-fixed-top ">
    <div class="container-fluid">
      <div class="navbar-header">
        <a class="navbar-brand" href="/">
          {{ site["site_name"] }}
        </a>
        <button class="togglebtn" onclick="openSidebar()">
          <span class="bar barone"></span>
          <span class="bar bartwo"></span>
          <span class="bar barthree"></span>
        </button>
<div class="dropdown profdd">
   <button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"><img src="https://i.imgur.com/bMtEllN.png" class="profileimg"></button>
   <ul class="dropdown-menu">
      <li><a href="/account">Account</a></li>
      <li><a href="/logout">Log Out</a></li>
   </ul>
</div>
      </div>
    </div>
  </nav>
  <!-- The Modal -->
  {#<div class="modal" id="currencyfrm">#}
  {#  <div class="modal-dialog">#}
  {#    <div class="modal-content">#}
  {#      <!-- Modal Header -->#}
  {#      <div class="modal-header">#}
  {#        <h4 class="modal-title">Currency</h4>#}
  {#        <button type="button" class="close" data-dismiss="modal">×</button>#}
  {#      </div>#}
  {#      <!-- Modal body -->#}
  {#      <div class="modal-body">#}
  {#        <ul class="currencylist" id="currencies-list">#}
  {#          <li>#}
  {#            <a href="#" id="currencies-item" data-rate-key="INR" data-rate-symbol="₹">INR#}
  {#              ₹</a>#}
  {#          </li>#}
  {#        </ul>#}
  {#      </div>#}

  {#      <!-- Modal footer -->#}
  {#      <div class="modal-footer">#}
  {#        <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>#}
  {#      </div>#}

  {#    </div>#}
  {#  </div>#}
  {#</div>#}
  <div class="nav-bottom">
    <div class="profilecard">
      <img src="https://i.imgur.com/bMtEllN.png">
      <p>{{ user['username'] }}!!</p>
      <span class="sbbal"><b>₹ {{ user['balance'] }}<br><small>Balance</small></b></span>
      <ul class="dropdown-menu" id="currencies-list">
        <li>
          <a href="#" id="currencies-item" data-rate-key="INR" data-rate-symbol="₹">INR ₹</a>
        </li>
      </ul>
      <span class="rankribbon" data-toggle="modal" data-target="#rankModal" style="cursor: pointer;">{% if user['balance'] > 1000 %}Young{% elseif user['balance'] > 5000 %}Senior{% elseif user['balance'] > 10000 %}Elite{% elseif user['balance'] > 50000 %}Vip{% elseif user['balance'] > 1000000 %}God{% else %}Junior{% endif %}</span>
    </div>
    <ul>
      <li {% if active_menu == "neworder" %} class="active" {% endif %}><a href="/"><i class="navbar-icon fas fa-plus"></i>{{ lang['neworder.title'] }}</a></li>
      <li {% if active_menu == "services" %} class="active" {% endif %}><a href="/services"><i class="navbar-icon fas fa-list"></i>{{ lang['services.title'] }}</a></li>
     <li {% if active_menu=="orders" %} class="active" {% endif %}><a href="/orders"><i class="navbar-icon fas fa-history"></i>{{ lang['orders.title'] }}</a></li>
     <li {% if active_menu=="addfunds" %} class="active" {% endif %}><a href="/addfunds"><i class="navbar-icon fas fa-dollar-sign"></i>{{ lang['addfunds.title'] }}</a></li>
     <li {% if active_menu=="tickets" %} class="active" {% endif %}><a href="/tickets"><i class="navbar-icon fas fa-headset"></i>{{ lang['tickets.title'] }}</a></li>
     <li {% if active_menu=="api" %} class="active" {% endif %}><a href="/api"><i class="navbar-icon fas fa-link"></i>{{ lang['api.title'] }}</a></li>
     <li {% if active_menu=="affiliates" %} class="active" {% endif %}><a href="/affiliates"><i class="navbar-icon fab fa-hubspot"></i>{{ lang['affiliates.title'] }}</a></li>
     <li {% if active_menu=="child-panels" %} class="active" {% endif %}><a href="/child-panels"><i class="navbar-icon fas fa-child"></i>{{ lang['childpanels.title'] }}</a></li>
    </ul>
  </div>
  <div class="martop">
    <!-- Main variables *content* -->
    <div class="container">
      <div class="row mb-2">
        <div class="col-md-4">
          <div class="statitem">
            <h4>You are currently on: <span class="sp_text_primary">{{ title }}</span></h4>
          </div>
        </div>
        <div class="col-md-3">
          <div class="statitem">
            <h4>Total Orders: <span class="sp_text_primary">{{ ordersCount }}</span></h4>
          </div>
        </div>
        <div class="col-md-5">
          <div class="statitem">
            <h4>Welcome <span class="sp_text_primary">{{ user['username'] }}</span>, Your Balance is : <span
                class="sp_text_primary">₹ {{ user['balance'] }}</span></h4>
          </div>
        </div>
      </div>
    </div>
{% else %}
<body id="userwapinuser">
  <nav class="guestnav navbar navbar-default navbar-fixed-top ">
    <div class="container">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
          aria-expanded="false" aria-controls="navbar">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="/">
          {{ site["site_name"] }}
        </a>
      </div>
      <div id="navbar" class="collapse navbar-collapse">
        <ul class="nav navbar-nav navbar-left-block">
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
              aria-expanded="false">
              English
              <span class="caret"></span>
            </a>
            <ul class="dropdown-menu dropdown-max-height">
              <li class="active">
                <a href="/en">English</a>
              </li>
            </ul>
          </li>
        </ul>
        <ul class="nav navbar-nav navbar-right">
          <li {% if active_menu == "auth" %} class="active" {% endif %}>
            <a href="/">
              Sign in
            </a>
          </li>
          <li {% if active_menu == "services" %} class="active" {% endif %}>
            <a href="/services">
              Services
            </a>
          </li>
          <li {% if active_menu=="api" %} class="active" {% endif %}>
            <a href="/api">
              API
            </a>
          </li>
          <li {% if active_menu=="signup" %} class="active" {% endif %}>
            <a href="/signup">
              Sign up
            </a>
          </li>
        </ul>
      </div>
    </div>
  </nav>
  {% endif %}
  
  <script type="text/javascript">
   window.modules.select = [];
</script>
<script type="text/javascript">
</script>
<script>
   function openSidebar() {
      var element = document.getElementById("userwapinuser");
      element.classList.toggle("triggerchngs");
   }
</script>
  <style>
 .body .modal .modal-content {
    background: #fff;
    color: black;
}

.modal-header h5 {
    color: #febe00;
}
.modal-footer a {
    color: #000;
}
.modal-header{
 border-bottom: none;
}
.modal-footer{
 border-top: none;
}
 </style>
 {# <!-----notification popup---------> #}
{% for pop in psw %}
{% if pop["title"] %}
<div class="modal fade" popIds="{{ popupNotif["notifIds"] }}"  id="notificationModal_{{ loop.index }}" tabindex="-1" aria-labelledby="notificationModalLabel_{{ loop.index }}" aria-hidden="true" data-keyboard="false" data-backdrop="static">
  <div class="modal-dialog modal-dialog-centered">
    <div class="modal-content">
      <div class="modal-header">
      <center><h5 style="color:white;" class="modal-title" id="notificationModalLabel">{{ pop["title"] }}</h5></center>  
      </div>
      <div class="modal-body">
               {{ pop["description"]|replace({"\n": "<br />"})  }}
      </div>
      <hr>
      <div class="modal-footer">
        {% if pop["action_link"] %}
        <a href="{{ pop["action_link"] }}" target="_blank" type="button" class="btn btn-primary">{% if(pop["action_text"] is empty) %} Click Here {% else %}{{ pop["action_text"] }}{% endif %}</a>
        {% endif %}
        <center><button type="button" class="btn btn-primary" data-dismiss="modal" data-toggle="modal" data-target="#notificationModal_{{ loop.index+1 }}">Close</button></center>
      </div>
    </div>
  </div>
</div>
{% endif %}
 {% endfor %}
