@extends('layouts.app')

@section('content')        

        <section class="pt-md-4 pb-md-0 bg-dark">
          <div class="container">
            <div class="row justify-content-between align-items-center">
              <div class="col-lg-8 col-md-9">
                <div class="d-none d-md-block">
                  <br>
                </div>
                <h1 class="d-md-block" style="color: white;">Mi cuenta</h1>
                <p class="lead"></p>           
              </div>
              <div class="col-md-3 d-none d-md-none">
               
              </div>
            </div> 
            <br>           
          </div>
        </section>  
        <section>
          <div class="container">
            <div class="row card">
              <div class="col card-body">
                <form action="{{route('user.cuenta.update')}}" method="post" enctype="multipart/form-data">
                  @csrf                                
                  <div>                                
                    <div class="row">
                      <div class="col-md-12">
                        @if(session('success'))
                          @if(session("mensaje") == 'Datos de la cuenta actualizado con éxito')
                            <div class="alert alert-success" role="alert">
                              {{session("mensaje")}}
                            </div>
                          @else
                            <div class="alert alert-danger" role="alert">
                              {{session("mensaje")}}
                            </div>
                          @endif
                        @endif
                      </div>
                      <div class="col-md-12">
                        <div class="form-group">
                          <label for="account-fn">Nombres</label>
                          <input class="form-control" name="name" type="text" id="account-fn" value="{{Auth::user()->name}}"><br>
                        </div>
                      </div>
                      <div class="col-md-12">
                        <div class="form-group">
                          <label for="account-email">Correo electrónico</label>
                          <input class="form-control" type="email" id="account-email" value="{{Auth::user()->email}}" name="email"><br>
                        </div>
                      </div>          
                    </div>                                   
                  </div>
                  <div class="row">
                                    <div class="col">
                                        <br>
                                        <button type="submit" class="btn btn-primary float-right">Actualizar</button>
                                    </div>
                  </div>
                </form>  
              </div>
            </div>            
          </div>
        </section>
@endsection
