@extends('member.layout.main')
@section('content')
<div class="row">
    <div class="col-lg-12" style="padding-left: 4px;padding-right: 4px;">
        <div class="card m-b-30" style="border-radius: 5px;">
            <div class="card-header">
                <h5 class="card-title" style="font-weight: bold; padding-top: 15px; font-size: 20px;">KYC Profile</h5>
            </div>

            <div class="card-body" style="padding-bottom: 50px;">
                @if(is_null($member_data->kyc))
                
                @if(!is_null($member_data->remark))
                <p style="color: red">Attention! {!! $member_data->remark !!}</p>
                @endif

                <form action="{{url('kycsubmit')}}" method="post" enctype="multipart/form-data">@csrf

                    <div class="row">
                        <div class="col-md-6">
                            <label>Your Name:</label>
                            <input style="margin-bottom: 10px;height: 38px;" class="form-control" type="text" name="name" value="{{$member_data->name}}" placeholder="Full Name" required>
                        </div>

                        <div class="col-md-6">
                            <label>Mobile Number:</label>
                            <input style="margin-bottom: 10px;height: 38px;" class="form-control" type="text" name="mobile" value="{{$member_data->mobile}}" placeholder="Mobile Number" required>
                        </div> 

                        <div class="col-md-6">
                            <label>Email:</label>
                            <input style="margin-bottom: 10px;height: 38px;" class="form-control" type="email" name="email" value="{{$member_data->email}}" placeholder="Email" required>
                        </div> 

                        <div class="col-md-6">
                            <label>NID Number:</label>
                            <input style="margin-bottom: 10px;height: 38px;" class="form-control" type="text" name="nid" value="{{$member_data->nid}}" placeholder="NID No" required>
                        </div>

                        <div class="col-md-6">
                            <label style="color: #fff;">Front Image:</label><br>
                            <input type="file" name="fimg" class="file" required>
                        </div>

                        <div class="col-md-6" style="margin-top: 12px;">
                            <label style="color: #fff;">Back Image:</label><br>
                            <input type="file" name="bimg" class="file" required>
                        </div>

                        <div class="col-md-6">
                            <button style="height: 38px;margin-top: 10px;background: #ec1666;color: #fff;" type="submit" class="btn">Confirm Now</button>
                        </div>
                    </div>

                </form>
                @elseif($member_data->kyc == 0)
                <p style="color:red">Attention! KYC Submitted Successfully. Please, Wait for Confirmation.</p>
                <p>
                    Name: {{$member_data->name}} <br>
                    NID No: {{$member_data->nid}} <br>
                </p>

                @foreach($imgs as $img)
                <img style="width: 250px; height: auto; padding: 5px; border-radius: 15px; border: 1px solid gray;margin-bottom: 10px;" src="{{URL::to($img->img)}}">
                @endforeach

                @elseif($member_data->kyc == 1)
                <p style="color: #edff00">Congratulation! Your KYC Approved!</p>
                <p>
                    Name: {{$member_data->name}} <br>
                    NID No: {{$member_data->nid}} <br>
                </p>

                @foreach($imgs as $img)
                <img style="width: 250px; height: auto; padding: 5px; border-radius: 15px; border: 1px solid gray;margin-bottom: 10px;" src="{{URL::to($img->img)}}">
                @endforeach
                @endif
            </div>
        </div>
    </div> 

  

      
</div>
@endsection