<x-user.layout title="{{ auth()->user()->lastname.' '.auth()->user()->firstname }} | Bitcoin/Blockchain Deposit">

    <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">Bitcoin/Blockchain Deposit</h6></div>
                        <div><a href="{{ route('user.deposit.bank') }}" class="btn btn-primary btn-sm" > Cash Deposit</a></div>
                    </div>

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

                        @if($errors->any())
                            <div class="alert alert-danger">
                                <em class="icon ni ni-alert-circle"></em>
                                <strong>Error:</strong> {{ $errors->first() }}
                            </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">
                            Use the below BTC Wallet to make deposit.
                            kindly inform the customer billing department by opening a
                            Support ticket after payment stating clearly your deposit
                            details for approval.

                        </p>
                        <h6 class="text-info text-bold border-bottom pb-3 text-uppercase">
                            Scan the Qrcode below or copy wallet address
                        </h6>

                        <div class="col-md-9">
                            <div class="mb-3">
                                {!! QrCode::color(52, 186, 176)->size(150)->generate(config('settings.btc_wallet_address')); !!}
                            </div>
                            <div class="form-label overline-title-alt lg order-address-type">Wallet Address</div>
                            <div class="form-control-wrap">
                                <div class="form-clip clipboard-init nk-tooltip" data-clipboard-target="#wallet-address" title="" data-original-title="Copy">
                                    <em class="click-to-copy icon ni ni-copy"></em>
                                </div>
                                <div class="form-icon"><em class="icon ni ni-sign-btc-alt"></em></div>
                                <input readonly="" type="text" class="form-control form-control-lg" id="wallet-address" value="{{ config('settings.btc_wallet_address') }}">
                            </div>
                        </div>

                        <div class="mt-5 col-md-9">
                            <form method="POST" class="form-validate is-alter" novalidate="novalidate"  id="submitForm" action="/user/deposit/create">
                                @csrf
                                <div class="form-group">
                                    <div class="text-info">
                                    <em class="icon ni ni-info"></em>
                                        Ensure you fill the form correctly only after you have made cash deposit.
                                    </div>
                                </div>
                                <div class="row g-gs">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label class="form-label" for="receiver"> Receiver (Customer Billing 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">Cash Deposit Amount</label>
                                            <div class="form-control-wrap">
                                                <div class="form-text-hint">
                                                    <span class="overline-title">Usd</span>
                                                </div>
                                                <input type="hidden" name="type" value="crypto">
                                                <input type="text" class="form-control" name="amount" value="{{ old('amount') }}" placeholder="Cash deposit amount" required>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <label class="form-label">Description</label>
                                            <textarea name="description" class="form-control" required>{{ old('description') }}</textarea>
                                        </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>Open Ticket</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>
