<div class="row mt-1">
   <form id="form_edit_clientes" action="" method="post" accept-charset="utf-8">
      <!-- Token CSRF -->
      <input type="hidden" name="csrf_test_name" value="<?= csrf_hash(); ?>">

      <div class="row g-2 mb-3">
         <div class="col-lg-2 col-4">
            <div class="form-floating">
               <input type="text" class="form-control" name="id_cliente" placeholder=" " maxlength="5" required value="<?php if (isset($cliente['id'])) { echo $cliente['id']; } ?>">
               <label for="id_cliente">Id cliente</label>
            </div>
         </div>
         <div class="col-lg-3 col-8">
            <div class="form-floating">
               <input type="text" class="form-control" name="telefono1" placeholder="+58 414-3326009" maxlength="25" required value="<?php if (isset($cliente['telefono1'])) { echo $cliente['telefono1']; } ?>">
               <label for="telefono1">Telefono **WhatsApp</label>
            </div>
         </div>
         <div class="col-lg-4">
            <div class="form-floating">
               <input type="text" class="form-control" name="contacto" placeholder=" " required  value="<?php if (isset($cliente['contacto'])) { echo $cliente['contacto']; } ?>">
               <label for="contacto">Nombre y Apellido</label>
            </div>
         </div>
      </div>

      <div class="row g-2 mb-2">
         <div class="col-lg-2">
            <div class="form-floating">
               <input type="text" class="form-control" name="rif" placeholder=" " style="text-transform: uppercase;" maxlength="15" maxlength="20" value="<?php if (isset($cliente['rif'])) { echo $cliente['rif']; } ?>" >
               <label for="rif">Rif</label>
            </div>
         </div>
         <div class="col-lg-4">
            <div class="form-floating">
               <input type="text" class="form-control" name="razonsocial" placeholder=" " value="<?php if (isset($cliente['razonsocial'])) { echo $cliente['razonsocial']; } ?>">
               <label for="razonsocial">Razon Social</label>
            </div>
         </div>
         <div class="col-lg-3">
            <div class="form-floating">
               <input type="text" class="form-control" name="telefono2" placeholder="+58 414-3326009" maxlength="25" value="<?php if (isset($cliente['telefono2'])) { echo $cliente['telefono2']; } ?>">
               <label for="telefono2">Telefono 2</label>
            </div>
         </div>
         <div class="col-lg-6">
            <div class="form-floating">
               <input type="email" class="form-control" name="email" placeholder=" " value="<?php if (isset($cliente['email'])) { echo $cliente['email']; } ?>">
               <label for="email">Email address</label>
            </div>
         </div>
         <div class="col-lg-6">
            <div class="form-floating">
              <textarea class="form-control" id="direccion" name="direccion"><?php if (isset($cliente['direccion'])) { echo $cliente['direccion']; } ?></textarea>
              <label for="direccion">Direccion</label>
            </div>
         </div>
      </div>


      <?php
         if ((session()->get('user_role')) == 'Administrador') {
            echo $this->include('administrador/ad_form_clie_edit.php');
         }
      ?>
      

      <hr>
      <div class="d-flex justify-content-between">
         <div></div>
         <div><button type="submit" class="btn btn-secondary">Enviar</button></div>
         
      </div>
   </form>
</div>