@extends('layouts.admin')

@section('content')
<!-- content @s -->
                <div class="nk-content nk-content-fluid">
                    <div class="container-xl wide-lg">
                        <div class="nk-content-body">
                            <div class="nk-block-head nk-block-head-sm">
                                <div class="nk-block-between">
                                    <div class="nk-block-head-content">
                                        <h3 class="nk-block-title page-title">Update KYC</h3>
                                        <div class="nk-block-des text-soft">
                                             
                                        </div>
                                    </div><!-- .nk-block-head-content -->
                                    
                                </div><!-- .nk-block-between -->
                            </div><!-- .nk-block-head -->
                            <div class="nk-block">
                                <div class="card card-bordered card-stretch">
                                    <div class="card-inner-group" style="
    padding: 20px;
">
                                         
                                        <div class="card-inner p-0">
                                            <div class="nk-tb-list nk-tb-ulist">
                                                
                                                    
                                                     
    <form action="{{ route('admin.kycs.update', $kyc->id)  }}" method="POST" class="form-validate is-alter">
                @csrf
                 
                        <div class="form-group">
                            <label class="form-label" for="full-name">Name</label>
                            <div class="form-control-wrap">
                                <input type="text" class="form-control" id="full-name" readonly value="{{ $kyc->user->name ?? 'No User' }}" >
                            </div>
                        </div>
                        @if($kyc->user->country == 'United States')
                        <div class="form-group">
                            <label class="form-label" for="full-name">SSN</label>
                            <div class="form-control-wrap">
                                <input type="text" class="form-control" id="full-name" readonly name="ssn" value="{{ $kyc->ssn}}" >
                            </div>
                        </div>
                        @endif
                        <div class="form-group">
                            <label class="form-label" for="full-name">ID Number</label>
                            <div class="form-control-wrap">
                                <input type="text" class="form-control" id="full-name" readonly name="id_number" value="{{ $kyc->id_number}}" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="form-label" for="full-name">ID Card Type</label>
                            <div class="form-control-wrap">
                                <input type="text" class="form-control" id="full-name" readonly name="id_type" value="{{ $kyc->id_type}}" >
                            </div>
                        </div>
                         
                        <div class="form-group">
                            <label class="form-label" for="username">KYC ID Card Image</label>
                            <div class="form-control-wrap">
                               <div class="custom-file-upload" id="fileUpload1">
                            
                            <img src="{{ asset('storage/app/public/' . $kyc->image) }}" width="270px">
                             
                        </div>
                            </div>
                        </div>
                        
                        
                        <div class="form-group">
                            <label class="form-label" for="username">KYC Status</label>
                            <div class="form-control-wrap">
                                <select name="status" class="form-control">
            <option value="1" {{ $kyc->user->kyc_verified == '1' ? 'selected' : '' }}>Active</option>
            <option value="2" {{ $kyc->user->kyc_verified == '2' ? 'selected' : '' }}>Pending</option>
            <option value="3" {{ $kyc->user->kyc_verified == '3' ? 'selected' : '' }}>Reject</option>
            <option value="4" {{ $kyc->user->kyc_verified == '4' ? 'selected' : '' }}>Closed</option>
        </select>
                            </div>
                        </div>
                         
                         
                        <div class="form-group">
                            <button type="submit" class="btn btn-lg btn-primary">Updated KYC</button>
                        </div>
                    </form>
                    
                      </div><!-- .nk-tb-list -->
                                        </div><!-- .card-inner -->
                                        <div class="card-inner">
                                            <div class="nk-block-between-md g-3">
                                                <div class="g">
                                               <!--     <ul class="pagination justi 
                                            </div><!-- .nk-block-between -->
                                        </div><!-- .card-inner -->
                                    </div><!-- .card-inner-group -->
                                </div><!-- .card -->
                            </div><!-- .nk-block -->
                        </div>
                    </div>
                </div>
                <!-- content @e -->
@endsection