<x-user.layout title="{{ auth()->user()->lastname.' '.auth()->user()->firstname }} | Wire-Transfer Withdrawal">
    <div class="nk-block">
        <div class="row g-gs">
            @if(auth()->user()->status != ACTIVE_USER)
                <div class="col-md-12 card card-inner">
                    <div class="alert alert-warning ff-base fw-medium">
                        <em class="icon ni ni-alert-circle"></em>
                        {{ __(config('settings.limited_user_message')) }}
                    </div>
                </div>
            @else
                <div class="col-md-6">
                    <div class="card">
                        <div class="card-inner">
                            <div class="d-flex justify-content-between align-items-start">
                                <div class="text-soft fs-16">Main Balance</div>
                                <div class="fs-20">{{ getUserBalance() }}</div>
                                <div></div><div></div>
                                <div></div><div></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="card">
                        <div class="card-inner">
                            <span class="text-info">Kindly ensure to fill out the withdrawal form correctly.</span>
                        </div>
                    </div>
                </div>

                <div class="col-md-12">
                    <div class="card">
                        <div class="card-inner">
                            @if($errors->any())
                                <div class="alert alert-danger alert-icon alert-dismissible">
                                    <em class="icon ni ni-cross-circle"></em> <strong>Failed</strong>! {{ $errors->first() }}. <button class="close" data-dismiss="alert"></button>
                                </div>
                            @elseif (session('success'))
                                <div class="alert alert-success alert-icon alert-dismissible">
                                    <em class="icon ni ni-cross-circle"></em> <strong>Done</strong>! {{ session('success') }}. <button class="close" data-dismiss="alert"></button>
                                </div>
                            @endif
                            <form method="POST" class="form-validate is-alter" novalidate="novalidate" id="submitForm" action="/user/withdrawal/normal/create">
                                @csrf
                                <div class="row g-gs">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="form-label">Bank Name</label>
                                            <div class="form-control-wrap">
                                                <input type="text" class="form-control" name="bank_name" required>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="form-label">Account Name</label>
                                            <div class="form-control-wrap">
                                                <input type="text" class="form-control" name="account_name" required>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="form-label">Account Number</label>
                                            <div class="form-control-wrap">
                                                <input type="text" class="form-control" name="account_number" required>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="form-label">Amount</label>
                                            <div class="form-control-wrap">
                                                <input type="number" name="amount" class="form-control" required>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="form-label">Remark</label>
                                            <div class="form-control-wrap">
                                                <input type="text" name="remark" class="form-control">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12">
                                        <input type="hidden" name="category" value="transfer">
                                        <button class="btn btn-primary">Withdraw</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            @endif
        </div>
    </div>

</x-user.layout>
