<?php require view('theme/header'); ?>
<main class="app-main">
    <div class="page-content acc-panel">
        <div class="container-fluid">
		
			<div class="card mt-5 mb-5">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="card-body">
							<div class="usp-top">
								<h2 class="hp-title">Kullanıcı Bilgileriniz;</h2>
								<p class="hpbb-text">
									Kullanıcı panelinize hoşgeldiniz.Tüm kullanıcı işlemlerinizi buradan gerçekleştirebilirsiniz.Merak ettikleriniz için destek talebi oluşturmayı unutmayınız.
								</p>
							</div>
							
							<div class="row mt-4">
								<div class="col-lg-3">
									<div class="top-card br">
										<div class="row align-items-center">
											<div class="col-auto">
												<div class="cnb-circle">
													<i class="far fa-user-crown"></i>
												</div>
											</div><!-- ./col -->
											<div class="col">
												<h2>Kullanıcı Adı</h2>
												<h3>{USER_USERNAME} <i class="far fa-badge-check"></i></h3>
											</div>
										</div>
									</div>
								</div>
								
								<div class="col-lg-3">
									<div class="top-card br">
										<div class="row align-items-center">
											<div class="col-auto">
												<div class="cnb-circle">
													<i class="far fa-envelope-open-text"></i>
												</div>
											</div><!-- ./col -->
											<div class="col">
												<h2>Kullanıcı Mail</h2>
												<h3>{USER_EMAIL}</h3>
											</div>
										</div>
                                    </div>
								</div>
								
								<div class="col-lg-3">
									<div class="top-card br">
										<div class="row align-items-center">
											<div class="col-auto">
												<div class="cnb-circle">
													<i class="far fa-badge-sheriff"></i>
												</div>
											</div><!-- ./col -->
											<div class="col">
												<h2>Kullanıcı Statüsü</h2>
												  <?php if (user['spent'] >= 100000){ ?>
												  <h3>Platin</h3>
												  <?php }elseif (user['spent'] >= 8000){ ?>
												  <h3>Altın</h3>
												  <?php }elseif (user['spent'] >= 4000){ ?>
												  <h3>Gümüş</h3>
												  <?php }else{ ?>
												  <h3>Bronz</h3>
												  <?php }; ?> 
											</div>
										</div>
                                    </div>
								</div>
								
								<div class="col-lg-3">
									<div class="top-card">
										<div class="row align-items-center">
											<div class="col-auto">
												<div class="cnb-circle">
													<i class="far fa-wallet"></i>
												</div>
											</div><!-- ./col -->
											<div class="col">
												<h2>Toplam Bakiye</h2>
												<h3>{USER_BALANCE} <?=CURRENCY_SYMBOL?></h3>
											</div>
										</div>
                                    </div>
								</div>
							</div>
                        </div>
                    </div>
                </div>
            </div>

			<div class="row">
                <div class="col-lg-4 col-md-5">
                    <div class="card">
                        <div class="card-body">
                            <ul class="nav nav-pills nav-custom-4 mb-3" id="pills-tab" role="tablist">
                                <li class="nav-item" role="presentation">
                                    <button class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" data-bs-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="false">
                                        Bilgileri Düzenle
                                    </button>
                                </li>
                                <li class="nav-item" role="presentation">
                                    <button class="nav-link" id="pills-contact-tab" data-bs-toggle="pill" data-bs-target="#pills-contact" type="button" role="tab" aria-controls="pills-contact" aria-selected="false">
                                        API Ayarları
                                    </button>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div><!-- col left -->
                <div class="col-lg-8 col-md- mt-4 mt-md-0">
				    <div class="card py-3">
                        <div class="card-body">
                            <div class="tab-content" id="pills-tabContent">
                                <div class="tab-pane fade active show" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
									<form {% if site['rtl'] %}class="rtl-form"{% endif %} method="post" action="">
										  
									   <div class="fga mb-4">
                                            <label class="fla" for="formCurrentPass">{USER_PASSWORD_TITLE}</label>
                                            <div class="fg">
												<div class="fg-icon"><i class="far fa-lock-alt"></i></div>
                                                <input type="password" id="password" name="password" class="fg-control">
                                            </div>
                                        </div>
                                        <div class="row">
                                            <div class="col-lg-6">
                                                <div class="fga mb-4">
                                                    <label class="fla" for="newPassowrd">{USER_NEW_PASSWORD_TITLE}</label>
                                                    <div class="fg">
														<div class="fg-icon"><i class="far fa-key"></i></div>
                                                        <input type="password" id="new_password" name="new_password" class="fg-control">
                                                    </div>
                                                </div>
                                            </div><!-- col -->
                                            <div class="col-lg-6">
                                                <div class="fga mb-4">
                                                    <label class="fla" for="confirmPass">{USER_RE_NEW_PASSWORD_TITLE}</label>
                                                    <div class="fg">
														<div class="fg-icon"><i class="far fa-key"></i></div>
                                                        <input type="password" id="re_new_password" name="re_new_password" class="fg-control">
                                                    </div>
                                                </div>
                                            </div><!-- col -->
                                        </div><!-- row -->
                                        <button type="submit" class="btn btn-primary btn-block">{UPDATE_PASSWORD_SUBMIT}</button>
                                    </form>
                                </div>
                                <div class="tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab">
								
                                   <form id="new_key" onsubmit="return false;">
                                        <div class="fga mb-4">
                                            <label class="fla" for="idAPIKEY">{API_KEY_TITLE}</label>
                                            <div class="fg">
											    <div class="fg-icon"><i class="far fa-code"></i></div>
											    <input type="text" class="fg-control" id="key" value="<?php if($settings["key_password"] == 1){echo "********************************";}else{echo "{USER_API_KEY}";}?>" readonly="">
											</div>
                                        </div>
										<input type="hidden" name="_csrf" value="{{csrftoken}}">
                                        <button type="submit" class="btn btn-primary btn-block">{UPDATE_API_KEY_SUBMIT}</button>
                                    </form>
                                </div>
                            </div><!-- ./tab-content -->
                        </div>
                    </div><!-- card -->
                </div><!-- ./col right -->
            </div>
  


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

<?php require view('theme/footer'); ?>
