{% include 'header.twig' %}
  
  <style>
:root{
                --primary-color: #8b75e3;
                --primary-color40: #8b75e366;
                --secondary-color: #140d64;
                --secondary-color40: #140d6466;
                --secondary-color70: #140d64b3;
                --white-shade: #b7a1a1;
                
            }

#charge {
color: green;

}
#charge:hover {
outline-offset: 0px;
outline: 1px solid #fff;

border: 1px solid #000;
color: #1A5F85;
border-radius: 3px;
font-weight: bold;
transition: border-color 0.2s ease;
}
#neworder_comment {

}
#neworder_comment:hover {
outline: 1px solid #fff;

border: 1px solid #000;
color: #1A5F85;
border-radius: 3px;
font-weight: bold;
transition: border-color 0.2s ease;
outline-offset: 0px;
}
#service_avg_time, #service_description {

}
 #service_avg_time:hover {
 outline-offset: 0px;
outline: 1px solid #fff;

border: 1px solid #000;
color: #1A5F85;
border-radius: 3px;
font-weight: bold;
transition: border-color 0.2s ease;
}
#service_description:hover {
outline: 1px solid #fff;
outline-offset: 0px;
border: 1px solid #000;
color: #1A5F85;
border-radius: 3px;
font-weight: bold;
transition: border-color 0.2s ease;
}
small.help-block.min-max:hover {
outline: 1px solid #fff;

border: 1px solid #000;
outline-offset: 0px;

color: #1A5F85;
border-radius: 3px;
font-weight: bold;
transition: border-color 0.2s ease;
}
small.help-block.min-max {
float: right;
border-radius: 8px;
}
#field-orderform-fields-link:hover {
outline: 1px solid #fff;

border: 1px solid #000;
outline-offset: 0px;

color: #1A5F85;
border-radius: 3px;
font-weight: normal;
transition: border-color 0.2s ease;
}
#field-orderform-fields-link {


}
#neworder_quantity {

}
#neworder_quantity:hover {
outline: 1px solid #fff;

border: 1px solid #000;

outline-offset: 0px;

color: #1A5F85;
border-radius: 3px;
font-weight: normal;
transition: border-color 0.2s ease;
}
#neworder_fields {
border: 1.5px solid white;
}



</style> 
     <link rel="stylesheet" type="text/css" href="/public/Eternity/sk.css"> 
     <div class="wrapper-content">
    <div class="wrapper-content__header">
          </div>
    <div class="wrapper-content__body">
      <!-- Main variables *content* -->
      


   
<div id="block_16">
    <div class="new_order-block">
        <div class="bg"></div>
        <div class="divider-top"></div>
        <div class="divider-bottom"></div>
        <div class="container-fluid">
            <div class="row mt-3">
                <div class="col-lg-7 mb-3 mb-lg-0">
                    <div class="component_form_group component_card component_radio_button">
                        <div class="component_status_tabs mb-3">
                            <div class="">
                                <ul class="nav nav-pills tab">
                                    <li class="nav-item">
                                        <a class="nav-link active" data-toggle="tab" href="#new-order" onclick="toggleTab('Normal',false)">🛍️ New Order</a>
                                    </li>
                                    <li class="nav-item">
                                        <a class="nav-link "  href="/massorder">⚖️ Mass Order</a>
                                    </li>
                                    <li class="nav-item lastLi" style="margin-left: auto;"><span readonly class="nav-link fixedOne" id="infoLi">💰 Balance :{{ user["balance"] }}</span></li>
                                </ul>
                            </div>
                        </div>
                        
                                                       <div class="card">
                                                        <div class="tab-content">
                                <div id="new-order" class="tab-pane in active">
                                    <div class="alert alert-success" role="alert" id="order-alert" style="margin: 5px;display:none">
                                        <button type="button" class="close" id="order-alert-close" aria-hidden="true">⨉</button>
                                        <legend id="al-title">Your</legend>
                                        <h6 id="al-id-row"><strong>ID: </strong> <span id="al-id"></span></h6>
                                        <h6 id="al-service-row"><strong> 📦 Services: </strong> <span id="al-service"></span></h6>
                                        <h6 id="al-link-row"><strong>🔗 Link: </strong> <span id="al-link"></span></h6>
                                        <h6 id="al-qty-row"><strong>⌛ Quantity: </strong> <span id="al-qty"></span></h6>
                                        <h6 id="al-runs-row"><strong>0-10 Minutes: </strong> <span id="al-runs"></span></h6>
                                        <h6 id="al-price-row"><strong>💰 Charge</strong> <span id="al-price"></span></h6>
                                        <h6 id="al-disc-row"><strong>Cashback Earned </strong> <span id="al-disc"></span></h6>
                                        <h6 id="al-bal-row"><strong>💰 Balance : </strong> <span id="al-bal"></span></h6>
                                    </div>
                                    <form action="/" method="post" id="order-form">
                                       
                                       
                                        {% if error %}
                     <div class="alert alert-dismissible alert-danger">
                        {{ errorText }}
                     </div>
                     {% endif %}
                     

{% if data["order"]["success"] == 1 %}
<div class="order-success-card" id="order-success-card">
<center>
<img src="https://i.ibb.co/3MJZdBd/icons8-checkmark-384-3x.png" alt="checkmark"></center>
<div class="user-details">
<div id="sample" class="order-details">
<center><p><span class="paid-amount"><b>Your Order Has Been Placed :</b><span  style="color:#7743DB">{{data['order']['id']}}</span></span></p></center>
 

<br>
<p><span class="service-name">
<b>Service :</b><br/>{{data['order']['service']}}</span></p>
<p><span class="link"><b>Link :</b><br /><a href="{{data['order']['link']}}">{{data['order']['link']}}</a></span></p>
<p><span class="quantity"><b> Quantity :</b><span style="color:#E0144C">{{data['order']['quantity']}}</span></span></p>
<div class="order-details">
    
</div></div>
<div class="user-details">
<center><p><span class="paid-amount"><b>You paid :</b><span style="color:#7743DB">{{ data['order']['price'] }}</span></span></p>
<p><b></b>Remaining balance :</b><span class="quantity" style="color:#E0144C">{{ data['order']['balance'] }}</span></p>

</div></div>
<button type="button" onclick="closeOrderReceiptCard()">OK</button>

<button type="button" onclick="CopyToClipboard('sample');return false;">Copy Order Details</button>
</div>
  
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>
  
    
<script>
function CopyToClipboard(id){
    var r = document.createRange();
r.selectNode(document.getElementById(id));
window.getSelection().removeAllRanges();
window.getSelection().addRange(r);
document.execCommand('copy');
window.getSelection().removeAllRanges();

var el = document.getElementById("order-success-card");

el.classList.remove("order-success-card-active");
    var copy = $('.copy_text').val();
    $('.copy_text').select();
    document.execCommand('copy');
    
    Swal.fire({
        icon: 'success',
        title: 'Successfully Copied',
        text: copy,
        showConfirmButton: false,
        timer: 3000
    });
    
}

 

</script>    

<script>

setTimeout(function(){
var el = $("#order-success-card");
el.addClass("order-success-card-active");
},1000);
function closeOrderReceiptCard(){

var el = document.getElementById("order-success-card");

el.classList.remove("order-success-card-active");
}
</script>
    {% 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>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">Ã—</span></button>

       </div>
    {% endif %}
 


     

<div class="well">


<form method="post" action="">
<div class="component_button_forms">
<div class="form-group">
<label for="orderformorderform-service" class="control-label">Category</label>
<select class="form-control" id="neworder_category" name="categories" data-select="true" data-select-search="true" data-select-search-placeholder="Search" data-select-container="#select-category-container" tabindex="-1" aria-hidden="true">
{{ category_html_simplify }}
</select>
<div id="select-category-container" class="position-relative"></div>
</div>
</div>


<div class="form-group">
<label for="orderform-service" class="control-label">Services</label>
<select class="form-control" id="neworder_services" name="services" data-select="true" data-select-search="true" data-select-search-placeholder="Search" data-select-container="#select-service-container" tabindex="-1" aria-hidden="true">
<option value="1">No services found in this category</option>
</select>
<div id="select-service-container" class="position-relative"></div>
</div>
<div id="neworder_fields"></div><input type="text" class="form-control" id="charge" readonly>
    </div>
  

 
               <div class="form-group" id="charge_div">
      <label for="charge" class="control-label">Charge</label>
      
      </div>

             
             <div class="new-order-button-submit component_button_submit ">
                  <button type="submit" class="btn btn-block btn-big-primary" onclick="clickme()"><font color="#FFFFFF"><b>🕊️{{ lang["neworder.button"] }}🕊️</b></button></right>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
		  <script type="text/javascript">
		  function clickme()
		  {
		  swal({
  title: "coded By weberstamila.com",
  text: "Your order fetching to our server pls wait.....!",
  icon: "info",
  buttons: false,
});
}
</script>
             
             
             
            </form></strong>
          </div>
          <strong> </strong>
         </div>
         <strong> </strong>
        </div>
        
    
 <p>&nbsp;&nbsp;&nbsp;</p>                         	
		
										</div>

									</div>
								</div>
							</div>
						</div>
					</div>
 


{% include 'footer.twig' %}