<!-- Profile Image -->
<div class="card card-primary card-outline">
  <div class="card-body box-profile">
    <div class="text-center">
        @if($userProfile->profile_image  === "")
            <img src="{{asset(config('site.config.guest_user_photo'))}}" class="profile-user-img img-fluid img-circle" alt="{{$userProfile->name}}">
        @else
            <img src="{{ asset($userProfile->profile_image) }}" class="profile-user-img img-fluid img-circle" alt="{{$userProfile->name}} Profile image">        
        @endif                  
    </div>

    @if($userProfile->name  !== "")
      <h3 class="profile-username text-center">{{$userProfile->name}}</h3>
      @else
      <h3 class="profile-username text-center">{{$userProfile->real_name}}</h3>                  
      @endif

    <p class="text-muted text-center">{{$userProfile->mobile_phone}}</p>

    <ul class="list-group list-group-unbordered mb-3">
      <li class="list-group-item">
        <b>Tools Usage</b> <a class="float-right">xxx</a>
      </li>
      <li class="list-group-item">
        <b>Logged in</b> <a class="float-right">xxx</a>
      </li>
      <li class="list-group-item">
        <b>Friends</b> <a class="float-right">xxx</a>
      </li>
    </ul>

    <a href="#" class="btn btn-primary btn-block"><b>Follow</b></a>
  </div>
  <!-- /.card-body -->
</div>
<!-- /.card -->

<!-- About Me Box -->
<div class="card card-primary">
  <div class="card-header">
    <h3 class="card-title">About Me</h3>
  </div>
  <!-- /.card-header -->
  <div class="card-body">
    <strong><i class="fas fa-book mr-1"></i> Introduction</strong>

    <p class="text-muted">
      {{$userProfile->usertitle}}
    </p>

    <hr>

    <strong><i class="fas fa-map-marker-alt mr-1"></i> Location</strong>

    <p class="text-muted"><!-- Malibu, California --> xxx</p>

    <hr>

    <strong><i class="fas fa-pencil-alt mr-1"></i> Personal</strong>

    <p class="text-muted">
      {{$userProfile->personal_text}}
    </p>

    <hr>

    <strong><i class="far fa-file-alt mr-1"></i> Notes</strong>

    <p class="text-muted">{{$userProfile->signature}}</p>
  </div>
  <!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
<div class="col-md-9">
<div class="card">
  <div class="card-header p-2">
    <ul class="nav nav-pills">
      <li class="nav-item"><a class="nav-link active" href="#activity" data-toggle="tab">Activity</a></li>
      <li class="nav-item"><a class="nav-link" href="#timeline" data-toggle="tab">Timeline</a></li>
      <li class="nav-item"><a class="nav-link" href="#settings" data-toggle="tab">Settings</a></li>
    </ul>
  </div><!-- /.card-header -->
  <div class="card-body">
    <div class="tab-content">
      <div class="active tab-pane" id="activity">
        <!-- Post -->
        <div class="post">
          <div class="user-block">
            <img class="img-circle img-bordered-sm" src="{{config('dashboard.config._dashboard_main_path')}}/dist/img/user1-128x128.jpg" alt="user image">
            <span class="username">
              <a href="#">Jonathan Burke Jr.</a>
              <a href="#" class="float-right btn-tool"><i class="fas fa-times"></i></a>
            </span>
            <span class="description">Shared publicly - 7:30 PM today</span>
          </div>
          <!-- /.user-block -->
          <p>
            Lorem ipsum represents a long-held tradition for designers,
            typographers and the like. Some people hate it and argue for
            its demise, but others ignore the hate as they create awesome
            tools to help create filler text for everyone from bacon lovers
            to Charlie Sheen fans.
          </p>

          <p>
            <a href="#" class="link-black text-sm mr-2"><i class="fas fa-share mr-1"></i> Share</a>
            <a href="#" class="link-black text-sm"><i class="far fa-thumbs-up mr-1"></i> Like</a>
            <span class="float-right">
              <a href="#" class="link-black text-sm">
                <i class="far fa-comments mr-1"></i> Comments (5)
              </a>
            </span>
          </p>

          <input class="form-control form-control-sm" type="text" placeholder="Type a comment">
        </div>
        <!-- /.post -->

        <!-- Post -->
        <div class="post clearfix">
          <div class="user-block">
            <img class="img-circle img-bordered-sm" src="{{config('dashboard.config._dashboard_main_path')}}/dist/img/user7-128x128.jpg" alt="User Image">
            <span class="username">
              <a href="#">Sarah Ross</a>
              <a href="#" class="float-right btn-tool"><i class="fas fa-times"></i></a>
            </span>
            <span class="description">Sent you a message - 3 days ago</span>
          </div>
          <!-- /.user-block -->
          <p>
            Lorem ipsum represents a long-held tradition for designers,
            typographers and the like. Some people hate it and argue for
            its demise, but others ignore the hate as they create awesome
            tools to help create filler text for everyone from bacon lovers
            to Charlie Sheen fans.
          </p>

          <form class="form-horizontal">
            <div class="input-group input-group-sm mb-0">
              <input class="form-control form-control-sm" placeholder="Response">
              <div class="input-group-append">
                <button type="submit" class="btn btn-danger">Send</button>
              </div>
            </div>
          </form>
        </div>
        <!-- /.post -->

        <!-- Post -->
        <div class="post">
          <div class="user-block">
            <img class="img-circle img-bordered-sm" src="{{config('dashboard.config._dashboard_main_path')}}/dist/img/user6-128x128.jpg" alt="User Image">
            <span class="username">
              <a href="#">Adam Jones</a>
              <a href="#" class="float-right btn-tool"><i class="fas fa-times"></i></a>
            </span>
            <span class="description">Posted 5 photos - 5 days ago</span>
          </div>
          <!-- /.user-block -->
          <div class="row mb-3">
            <div class="col-sm-6">
              <img class="img-fluid" src="{{config('dashboard.config._dashboard_main_path')}}/dist/img/photo1.png" alt="Photo">
            </div>
            <!-- /.col -->
            <div class="col-sm-6">
              <div class="row">
                <div class="col-sm-6">
                  <img class="img-fluid mb-3" src="{{config('dashboard.config._dashboard_main_path')}}/dist/img/photo2.png" alt="Photo">
                  <img class="img-fluid" src="{{config('dashboard.config._dashboard_main_path')}}/dist/img/photo3.jpg" alt="Photo">
                </div>
                <!-- /.col -->
                <div class="col-sm-6">
                  <img class="img-fluid mb-3" src="{{config('dashboard.config._dashboard_main_path')}}/dist/img/photo4.jpg" alt="Photo">
                  <img class="img-fluid" src="{{config('dashboard.config._dashboard_main_path')}}/dist/img/photo1.png" alt="Photo">
                </div>
                <!-- /.col -->
              </div>
              <!-- /.row -->
            </div>
            <!-- /.col -->
          </div>
          <!-- /.row -->

          <p>
            <a href="#" class="link-black text-sm mr-2"><i class="fas fa-share mr-1"></i> Share</a>
            <a href="#" class="link-black text-sm"><i class="far fa-thumbs-up mr-1"></i> Like</a>
            <span class="float-right">
              <a href="#" class="link-black text-sm">
                <i class="far fa-comments mr-1"></i> Comments (5)
              </a>
            </span>
          </p>

          <input class="form-control form-control-sm" type="text" placeholder="Type a comment">
        </div>
        <!-- /.post -->
      </div>
      <!-- /.tab-pane -->
      <div class="tab-pane" id="timeline">
        <!-- The timeline -->
        <div class="timeline timeline-inverse">
          <!-- timeline time label -->
          <div class="time-label">
            <span class="bg-danger">
              10 Feb. 2014
            </span>
          </div>
          <!-- /.timeline-label -->
          <!-- timeline item -->
          <div>
            <i class="fas fa-envelope bg-primary"></i>

            <div class="timeline-item">
              <span class="time"><i class="far fa-clock"></i> 12:05</span>

              <h3 class="timeline-header"><a href="#">Support Team</a> sent you an email</h3>

              <div class="timeline-body">
                Etsy doostang zoodles disqus groupon greplin oooj voxy zoodles,
                weebly ning heekya handango imeem plugg dopplr jibjab, movity
                jajah plickers sifteo edmodo ifttt zimbra. Babblely odeo kaboodle
                quora plaxo ideeli hulu weebly balihoo...
              </div>
              <div class="timeline-footer">
                <a href="#" class="btn btn-primary btn-sm">Read more</a>
                <a href="#" class="btn btn-danger btn-sm">Delete</a>
              </div>
            </div>
          </div>
          <!-- END timeline item -->
          <!-- timeline item -->
          <div>
            <i class="fas fa-user bg-info"></i>

            <div class="timeline-item">
              <span class="time"><i class="far fa-clock"></i> 5 mins ago</span>

              <h3 class="timeline-header border-0"><a href="#">Sarah Young</a> accepted your friend request
              </h3>
            </div>
          </div>
          <!-- END timeline item -->
          <!-- timeline item -->
          <div>
            <i class="fas fa-comments bg-warning"></i>

            <div class="timeline-item">
              <span class="time"><i class="far fa-clock"></i> 27 mins ago</span>

              <h3 class="timeline-header"><a href="#">Jay White</a> commented on your post</h3>

              <div class="timeline-body">
                Take me to your leader!
                Switzerland is small and neutral!
                We are more like Germany, ambitious and misunderstood!
              </div>
              <div class="timeline-footer">
                <a href="#" class="btn btn-warning btn-flat btn-sm">View comment</a>
              </div>
            </div>
          </div>
          <!-- END timeline item -->
          <!-- timeline time label -->
          <div class="time-label">
            <span class="bg-success">
              {{ \App\Helpers\DateHelper::convertTimesamp2Datetime($userProfile->timeCreated)}}
            </span>
          </div>
          <!-- /.timeline-label -->
          <!-- timeline item -->
          <div>
            <i class="fas fa-camera bg-purple"></i>
            <div class="timeline-item">
              <span class="time"><i class="far fa-clock"></i> {{ \App\Helpers\DateHelper::convertTimesamp2Datetime($userProfile->timeCreated)}}</span>
              <h3 class="timeline-header"><a href="#">{{$userProfile->name}}</a>Registered to {{config('site.config._sitename')}}</h3>
<!--                          <div class="timeline-body">
                <img src="https://placehold.it/150x100" alt="...">
                <img src="https://placehold.it/150x100" alt="...">
                <img src="https://placehold.it/150x100" alt="...">
                <img src="https://placehold.it/150x100" alt="...">
              </div>-->
            </div>
          </div>
          <!-- END timeline item -->
          <div>
            <i class="far fa-clock bg-gray"></i>
          </div>
        </div>
      </div>
      <!-- /.tab-pane -->

      <div class="tab-pane" id="settings">
        <form action="{{ localized_route('myaccount.profile.post', ['userId', $userProfile->id]) }}" method="post" class="form-horizontal" enctype="multipart/form-data">
                @csrf  <!-- ✅ Fix: Include CSRF token -->
              <div class="form-group row">
                  <label for="inputEmail" class="col-sm-2 col-form-label">Email<span style="color:red">*</span></label>
                  <div class="col-sm-10">
                      <input name="email" type="email" class="form-control" id="inputEmail" placeholder="Email" value="{{$userProfile->email}}">
                      <input type="checkbox" name="hide_email" value="1" {{ old('show_online', $userProfile->hide_email) == '1' ? 'checked' : '' }}>&nbsp;Hide your email
                  </div>
              </div>
              <div class="form-group row">
                  <label for="inputName2" class="col-sm-2 col-form-label">Name</label>
                  <div class="col-sm-10">
                      <input name="name" type="text" class="form-control" id="inputName" placeholder="Name" value="{{$userProfile->name}}">
                  </div>
              </div>
              <div class="form-group row">
                <label for="inputName2" class="col-sm-2 col-form-label">Google ID</label>
                <div class="col-sm-10">
                    <input name="google_id" type="text" class="form-control" id="inputGoogleId" placeholder="Google ID" value="{{$userProfile->google_id}}">
                </div>
              </div>
              <div class="form-group row">
                <label for="inputName2" class="col-sm-2 col-form-label">Photo</label>
                <div class="col-sm-10">
                    @if($userProfile->profile_image !== '')
                    <img src="{{ asset($userProfile->profile_image) }}" alt="{{$userProfile->name}} Profile Image" width="150">
                    @endif
                </div>
                    <label for="inputName2" class="col-sm-2 col-form-label">&nbsp;</label>                
                <div class="col-sm-10">
                    <input name="profile_image" type="file" class="form-control" id="inputPhoto" placeholder="photo">
                </div>
              </div>      
              <div class="form-group row">
                <label for="inputName2" class="col-sm-2 col-form-label">Mobile Phone</label>
                <div class="col-sm-10">
                    <input name="mobile_phone" type="text" class="form-control" id="inputMobilePhone" placeholder="Mobile Phone" value="{{$userProfile->mobile_phone}}">
                </div>
              </div>
                <div class="form-group row">
                <label for="inputName2" class="col-sm-2 col-form-label">Short Introduction</label>
                <div class="col-sm-10">
                      <textarea name="usertitle" class="form-control" id="inputUserTitle" placeholder="Short Self-introduction">{{$userProfile->usertitle}}</textarea>
                </div>
              </div>
              <div class="form-group row">
                  <label for="inputName2" class="col-sm-2 col-form-label">Personal Text</label>
                  <div class="col-sm-10">
                        <textarea name="personal_text" class="form-control" id="inputPersonalText" placeholder="Personal Text">{{$userProfile->personal_text}}</textarea>
                  </div>
              </div>  
              <div class="form-group row">
                  <label for="inputName2" class="col-sm-2 col-form-label">Signature</label>
                  <div class="col-sm-10">
                        <textarea name="signature" class="form-control" id="inputSignature" placeholder="Your Signature">{{$userProfile->signature}}</textarea>
                  </div>
              </div>
              <div class="form-group row">
                <label for="inputExperience" class="col-sm-2 col-form-label">Show Status</label>
                <div class="col-sm-10">
                    <input type="checkbox" name="show_online" value="1" {{ old('show_online', $userProfile->show_online) == '1' ? 'checked' : '' }}>&nbsp;Show Online's status<br>
                </div>
              </div>
               <div class="form-group row">
                <label for="inputExperience" class="col-sm-2 col-form-label">Gender</label>
                <div class="col-sm-10">
                    <select name="gender" class="custom-select">
                        <option value="Please select">Please select</option>                                    
                        <option value="Men" {{ old('gender', $userProfile->gender) == 'Men' ? 'selected' : '' }}>Men</option>
                        <option value="Women" {{ old('gender', $userProfile->gender) == 'Women' ? 'selected' : '' }}>Women</option>
                        <option value="Prefer not to say" {{ old('gender', $userProfile->gender) == 'Prefer not to say' ? 'selected' : '' }}>Prefer not to say</option>                                    
                    </select>
                </div>
              </div>                       
              <div class="form-group row">
                <div class="offset-sm-2 col-sm-10">
                  <div class="checkbox">
                    <label>
                        <input type="checkbox" name="agreeTermsAndConditions" value="1"> I agree to the <span style="color:red">*</span><a href="#">terms and conditions</a>
                    </label>
                  </div>
                </div>
              </div>
              <div class="form-group row">
                <div class="offset-sm-2 col-sm-10">
                  <button type="submit" class="btn btn-danger">Submit</button>
                </div>
              </div>
        </form>
      </div>
      <!-- /.tab-pane -->
    </div>
    <!-- /.tab-content -->
  </div><!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->