{% include 'header.twig' %}

    
    <!-- Main variables *content* -->
		<section class="pt-5">
  <div class="container">
      {% if error %}
        <div class="alert alert-dismissible alert-success ">
          <button type="button" class="close" data-dismiss="alert">×</button>
          {{ errorText }}
        </div>
      {% endif %}
      {% if success %}
        <div class="alert alert-dismissible alert-success">
          <button type="button" class="close" data-dismiss="alert">×</button>
          {{ successText }}
        </div>
      {% endif %}
    <div class="row">
      <div class="col-md-6">
        <div class="card">
          <div class="card-body">
            <div class="row align-items-center">
              <div class="col-auto">
                <div class="account-icon">
                  <i class="ri-shield-user-line"></i>
                </div>
              </div>
              <div class="col">
                <div class="acc-title">
                                    Username
                                  </div>
                <div class="acc-text">{{ user['username'] }}</div>
              </div>
            </div>
          </div>
        </div><!-- ./card -->
      </div><!-- ./col(start) -->
      <div class="col-md-6">
        <div class="card">
          <div class="card-body">
		   <form  action="/account/newapikey" method="post">
            <div class="row align-items-center">
              <div class="col-auto">
                <div class="account-icon">
                  <i class="ri-shield-user-line"></i>
                </div>
              </div>
              <div class="col">
                <div class="acc-title">API</div>
                <div class="acc-text">
                                    Regenrate API Key
                                  </div>
              </div>
              <div class="col-auto">
				<input type="hidden" name="csrf_token" value="{{ csrfToken }}">
                <button type="submit" class="btn btn-primary btn-border d-flex align-items-center justify-content-center"
                  style="font-size: 24px; width: 50px; height: 50px; padding: 0;">
                  <i class="ri-refresh-line"></i>
                </button>
              </div>
            </div>
			</form>			
          </div>
        </div><!-- ./card -->
      </div><!-- ./col(end) -->
    </div>
  </div>
</section>
<p></p>

<section class="pt-4">
	<div class="container">
		<div class="row">
			<div class="col-lg-12">
				  			</div>
		</div>
	</div>
</section>

<section class="pt-4">
  <div class="container">
    <div class="row">
      <div class="col-lg-6">
        <div class="card">
          <div class="card-header">
            <div class="card-custom-title">
              <div class="row align-items-center">
                <div class="col-auto">
                  <div class="d-head-icon">
                    <i class="ri-lock-password-line"></i>
                  </div>
                </div>
                <div class="col">
                  <h3 class="card-title">
                                      Change Password
                                    </h3>
                </div>
              </div>
            </div>
          </div>
          <div class="card-body">
			<form  method="post" action="">
			                <div class="row">
                <div class="col-md-12 mb-4">
                  <label for="form-current-password" class="form-label">Current password</label>
                  <input type="password" id="current" name="current_password" class="form-control">
                </div>
                <div class="col-md-6 mb-4">
                  <label for="form-new-password" class="form-label">New password</label>
                  <input type="password" id="new" name="password" class="form-control">
                </div>
                <div class="col-md-6 mb-4">
                  <label for="form-confirm-password" class="form-label">Confirm new password</label>
                  <input type="password" id="confirm" name="confirm_password" class="form-control">
                </div>
              </div>
			  <input type="hidden" name="csrf_token" value="{{ csrfToken }}">
              <button type="submit" class="btn btn-primary btn-border btn-100">
                                  Change Password
                                </button>
            </form>
          </div>
        </div><!-- ./card -->
      </div><!-- ./col (start) -->
      <div class="col-lg-6 mt-4 mt-lg-0">
        <div class="card">
          <div class="card-header">
            <div class="card-custom-title">
              <div class="row align-items-center">
                <div class="col-auto">
                  <div class="d-head-icon">
                    <i class="ri-sound-module-line"></i>
                  </div>
                </div>
                <div class="col">
                  <h3 class="card-title">
                                      Other Settings
                                    </h3>
                </div>
              </div>
            </div>
          </div>
          <div class="card-body">
		              <form  method="post" action="">
              <div class="mb-3">
                <label for="form-timezone" class="form-label">Language</label>
                <select class="form-control" name="lang">
															{% for language in site['languages'] %}
																<option {% if language["code"] == user["lang"] %} selected {% endif %} value="{{ language["code"] }}">{{ language["name"] }}</option>
															{% endfor %}
														</select>
              </div><!-- ./form item --> 
			  <input type="hidden" name="_csrf" value="ORpRc3O19uvXtrINc6H68C7R4dCoKFGrVWYD4MLG40NTW2kSFMy5uY7D3Wk3wJ6ZZ4mYsfJ-GcltNWvXm5KICg==">
              <button type="submit" class="btn btn-primary btn-border btn-100">
                                  Update
                                </button>
			</form>
			 	
			<form  action="" method="post">  
              <div class="mt-4 mb-3">
                <label for="form-timezone" class="form-label">Timezone</label>
                <select name="timezone" id="timezone" class="form-control">
																{% for timezone in timezones %}
																	<option {% if timezone["timezone"] == user['timezone'] %} selected {% endif %} value="{{ timezone["timezone"] }}">{{ timezone["label"] }}</option>
																{% endfor %}
															</select>
              </div><!-- ./form item --> 
			  <input type="hidden" name="_csrf" value="ORpRc3O19uvXtrINc6H68C7R4dCoKFGrVWYD4MLG40NTW2kSFMy5uY7D3Wk3wJ6ZZ4mYsfJ-GcltNWvXm5KICg==">
              <button type="submit" class="btn btn-primary btn-border btn-100">
                                  Update
                                </button>
            </form>
          </div>
        </div>
      </div><!-- ./col (end) -->
    </div>
  </div>
</section>



 {% include 'footer.twig' %}