<x-user.layout title="{{ auth()->user()->lastname.' '.auth()->user()->firstname }} | Apply for credit/debit cards">

    <div class="nk-block">
        <div class="row g-gs">
            <div class="col-12">
                <div class="card h-100">

                    <div class="card-inner card-title-group card-title border-bottom d-flex justify-content-between">
                        <div><h6 class="title">Apply for card</h6></div>
                        <div><a href="{{ route('user.cards') }}" class="btn btn-primary btn-sm" > My Card</a></div>
                    </div>

                    <div class="card-inner col-md-10">

                        @if(session('error'))
                            <div class="alert alert-danger">
                                <em class="icon ni ni-alert-circle"></em>
                                <strong>Error:</strong> {{ session('error') }}
                            </div>
                        @elseif(session('success'))
                            <div class="alert alert-success">
                                <em class="icon ni ni-check-circle"></em>
                                <strong>DONE:</strong> {{ session('success') }}
                            </div>
                        @endif


                        <p class="text-info text-bold border-bottom pb-3">
                            You can use the below form to request for a new card.
                            Please note that if there is any old card, it will be
                            disconnected for the new one to function.
                            <span class="text-danger">
                                You will be charged the sum of {{ getUserCurrency().config('settings.card_price') }} for new cards.
                            </span>
                            So ensure your account balance is enough to purchase our card
                        </p>


                        <div class="mt-5 col-md-9">
                            <form method="POST" class="form-validate is-alter" id="submitForm" novalidate="novalidate">
                                @csrf
                                <div class="row g-gs">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="form-label" for="receiver"> Receiver (Customer Cards Department)</label>
                                            <div class="form-control-wrap">
                                                <input type="text" class="form-control" name="receiver" value="Customer care" disabled>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="form-label" for="amount">Card Type</label>
                                            <div class="form-control-wrap">
                                                <select name="type" class="form-select">
                                                    <option value="visa">Visa</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="nk-pps-field form-action text-center">
                                        <div class="nk-pps-action">
                                            <button class="btn btn-block btn-primary buttonClick">
                                                <span>Request Card</span>
                                                <span class="spinner-border spinner-border-sm hide button-spinner" style="display: none;" role="status" aria-hidden="true"></span>
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</x-user.layout>
