{% include 'header.twig' %}
<div id="content-wrap">
<div class="section">
<div class="container collapse-view">
    <div class="text-content">
              <div class="row">
                <div class="col-6 mb-2">You are currently on:   <strong>New order</strong></div>
                <div class="col-6 mb-2">Welcome,   <strong>{{ user['username'] }}</strong>! Your balance is <strong>{% if settings['site_currency'] == "TRY" %}{{ "&#8378;" }}
                {% elseif settings['site_currency'] == "USD" %}{{ "&#36;" }}
                {% else %}{{ "₹" }}
                {% endif %}{{ user['balance'] }}</strong></div>
              </div>
            </div>
  <div class="row">
    <div class="col-lg-7 mb-4">

    {% if user['balance'] < 5 %}
      <div class="alert alert-dismissible alert-danger">
        <button type="button" class="close" data-dismiss="alert">×</button>
        <strong>Dear @{{ user['username'] }}, </strong> <br>Your balance seems to be running low, don't forget to top up for trouble-free service.
      </div>
     {% endif %}

    {% if error %}
      <div class="alert alert-dismissible alert-danger">
        {{ errorText }}
      </div>
    {% endif %}

    {% if data["order"]["success"] == 1 %}
      <div class="alert alert-dismissible alert-success">
          <strong> {{ lang["neworder.success.id"] }}: </strong> {{ data['order']['id'] }} <br>
          <strong> {{ lang["neworder.success.service"] }}: </strong> {{ data['order']['service'] }} <br>
          <strong> {{ lang["neworder.success.link"] }}: </strong> {{ data['order']['link'] }} <br>
          <strong> {{ lang["neworder.success.quantity"] }}: </strong> {{ data['order']['quantity'] }} <br>
          <strong> {{ lang["neworder.success.charge"] }}: </strong> {{ data['order']['price'] }} <br>
          <strong> {{ lang["neworder.success.balance"] }}: </strong>{{ data['order']['balance'] }} <br>
      </div>
    {% endif %}
    {% if data["order"]["success"] == 2 %}
      <div class="alert alert-dismissible alert-success">
         <strong> {{ lang["neworder.success.id"] }}: </strong> {{ data['order']['id'] }} <br>
         <strong> {{ lang["neworder.success.service"] }}: </strong> {{ data['order']['service'] }} <br>
         <strong> {{ lang["neworder.success.username"] }}: </strong> {{ data['order']['link'] }} <br>
         <strong> {{ lang["neworder.success.quantity"] }}: </strong> {{ data['order']['min'] }} - {{ data['order']['max'] }} <br>
         <strong> {{ lang["neworder.success.posts"] }}: </strong> {{ data['order']['posts'] }} <br>
         <strong> {{ lang["neworder.success.delay"] }}: </strong>{{ data['order']['delay'] }} <br>
       </div>
    {% endif %}

      <div class="account-info wrapper-box">
          <div class="button-bar">
        <a data-target="#tab-order" class="btn tab-head btn-primary">NEW ORDER</a>
      </div>

        <form method="post" action="">

            <div class="form-group">
              <label for="orderform-category" class="control-label">{{ lang["neworder.category"] }}</label>
              <select class="form-control" id="neworder_category" name="categories">
                {% for category in categories %}
                    <option value="{{ category["category_id"] }}" {% if category["category_id"] == data['categories'] %} selected {% endif %} >{{ category["category_name"] }}</option>
                {% endfor %}
                </select>
            </div>
            <div class="form-group">
              <label for="orderform-service" class="control-label">{{ lang["neworder.service"] }}</label>
              <select class="form-control" id="neworder_services" name="services">

              </select>
            </div>

            <div id="neworder_fields"></div>

            <div class="form-group" id="charge_div">
              <label for="charge" class="control-label">{{ lang["neworder.charge"] }}</label>
              <input type="text" class="form-control" id="charge" readonly>
            </div>


          
          <button type="submit" class="btn btn-primary">{{ lang["neworder.button"] }}</button>

        </form>
      </div>
    </div>
    <div class="col-lg-5">
    <div class="new-order">
      <div class="head"><h5>NEW ORDERS</h5></div>
      <div class="content">
        <div class="media">
          <img src="https://yourperfectapp.com/jap3/dashboard/img/logo.png" alt="" class="align-self-center mr-3">
          <div class="media-body" id="service_name"></div>
        </div>

        <div class="row">
          <div class="col-12 mt-3">
            <h6>EXAMPLE LINK</h6>
            <p>
              <a href="https://anon.ws/?null" id="example_link"></a>
            </p>
          </div>
          <div class="col-6 mt-3"><h6>START TIME</h6><p id="start_time"></p></div>
          <div class="col-6 mt-3"><h6>SPEED</h6><p id="speed"></p></div>
          <div class="col-6 mt-3"><h6>GUARANTEED</h6><p id="guaranteed"></p></div>
          <div class="col-6 mt-3"><h6>AVERAGE TIME</h6><p id="average_time"></p></div>
          <div class="col-12 mt-3"><h6>DESCRIPTION</h6><p id="description_detail"></p></div>
         <div class="col-12 mt-3" style="font-size: 13px; font-style: italic;">
                        Don't worry if any of these information showed N/A or NULL, not all the services have the monitor available.<br>Also give it a second to update as you switch services, we are loading it when you switch instead of all together to make the website faster and the information as accurate as possible.
                    </div>
        </div>
      </div>
    </div>
  </div>
  </div>
</div>
</div>    
</div>

{#<div class="container">#}
{#  <div class="row">#}
{#    <div class="col-md-8 col-md-offset-2">#}
{#      <div class="well ">#}
{#        {{ contentText }}#}
{#      </div>#}
{#    </div>#}
{#  </div>#}
{#</div>#}

{% include 'footer.twig' %}
