<div class="row">
    <div class="col-md-6 col-xxl-12">
        <div class="card">
            <div class="card-body">
                <?php if($cards->isEmpty()): ?>
                    <div class="card bg-primary rounded-4">
                        <div class="card-body">
                            <span class="float-end text-white-50 display-5 mt-n1"><i class="ti ti-wifi"></i></span>
                            <h4 class="text-white"><?php echo e($user->first_name); ?> <?php echo e($user->last_name); ?></h4>

                            <div class="row align-items-center mt-4">
                                <div class="col-3 text-white fs-10">
                                    <i class="ti ti-circle-filled"></i>
                                    <i class="ti ti-circle-filled"></i>
                                    <i class="ti ti-circle-filled"></i>
                                    <i class="ti ti-circle-filled"></i>
                                </div>
                                <div class="col-3 text-white fs-10">
                                    <i class="ti ti-circle-filled"></i>
                                    <i class="ti ti-circle-filled"></i>
                                    <i class="ti ti-circle-filled"></i>
                                    <i class="ti ti-circle-filled"></i>
                                </div>
                                <div class="col-3 text-white fs-10">
                                    <i class="ti ti-circle-filled"></i>
                                    <i class="ti ti-circle-filled"></i>
                                    <i class="ti ti-circle-filled"></i>
                                    <i class="ti ti-circle-filled"></i>
                                </div>
                                <div class="col-3 text-white fs-13 fw-bold">
                                    <span>0</span>
                                    <span>0</span>
                                    <span>0</span>
                                    <span>0</span>
                                </div>
                            </div>

                            <div class="row mt-4 align-items-center">
                                <div class="col-4">
                                    <p class="text-white-50 mb-1">Expiry Date</p>
                                    <h5 class="text-white my-0">00/00</h5>
                                </div>

                                <div class="col-4">
                                    <p class="text-white-50 mb-1">CVV</p>
                                    <h5 class="text-white my-0">XXX</h5>
                                </div>
                                <div class="col-4">
                                    <div class="text-end">
                                        <img src="/dashboard/assets/images/cards/visa-white.svg" alt=""
                                            height="20" class="me-1">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="d-flex justify-content-between align-items-center mb-2">
                        <div>
                            <h5 class="text-muted">Balance:</h5>
                            <h4 class="fs-18"><?php echo e(currency($user->currency)); ?><?php echo e(formatAmount($user->balance)); ?> <small
                                    class="text-muted"><?php echo e(currency($user->currency, 'code')); ?></small>
                            </h4>
                        </div>
                        <a href="<?php echo e(route('user.card.create')); ?>"
                            class="link-reset text-decoration-underline link-offset-2 fw-semibold pb-2">
                            Get a Card
                        </a>
                    </div>
                <?php else: ?>
                    <div id="carouselExampleIndicators" class="carousel slide carousel-dark" data-bs-ride="carousel">
                        <div class="carousel-indicators mb-n2">
                            <?php $__currentLoopData = $cards; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $card): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <button type="button" data-bs-target="#carouselExampleIndicators"
                                    data-bs-slide-to="<?php echo e($index); ?>" class="<?php echo e($index === 0 ? 'active' : ''); ?>"
                                    aria-current="<?php echo e($index === 0 ? 'true' : 'false'); ?>"
                                    aria-label="Slide <?php echo e($index + 1); ?>"></button>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <div class="carousel-inner">
                            <?php $__currentLoopData = $cards; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $card): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="carousel-item <?php echo e($index === 0 ? 'active' : ''); ?>">
                                    <div
                                        class="card bg-<?php echo e($card->type->value === 'virtual' ? 'primary' : 'success'); ?> shadow-none rounded-4">
                                        <div class="card-body">
                                            <span class="float-end text-white-50 display-5 mt-n1"><i
                                                    class="ti ti-wifi"></i></span>
                                            <h4 class="text-white"><?php echo e($card->user->first_name); ?>

                                                <?php echo e($card->user->last_name); ?></h4>

                                            <div class="row align-items-center mt-4">
                                                <div class="col-3 text-white fs-10">
                                                    <i class="ti ti-circle-filled"></i>
                                                    <i class="ti ti-circle-filled"></i>
                                                    <i class="ti ti-circle-filled"></i>
                                                    <i class="ti ti-circle-filled"></i>
                                                </div>
                                                <div class="col-3 text-white fs-10">
                                                    <i class="ti ti-circle-filled"></i>
                                                    <i class="ti ti-circle-filled"></i>
                                                    <i class="ti ti-circle-filled"></i>
                                                    <i class="ti ti-circle-filled"></i>
                                                </div>
                                                <div class="col-3 text-white fs-10">
                                                    <i class="ti ti-circle-filled"></i>
                                                    <i class="ti ti-circle-filled"></i>
                                                    <i class="ti ti-circle-filled"></i>
                                                    <i class="ti ti-circle-filled"></i>
                                                </div>
                                                <div class="col-3 text-white fs-13 fw-bold">
                                                    <?php
                                                        $lastFour = substr($card->card_number, -4);
                                                    ?>
                                                    <span><?php echo e($lastFour[0]); ?></span>
                                                    <span><?php echo e($lastFour[1]); ?></span>
                                                    <span><?php echo e($lastFour[2]); ?></span>
                                                    <span><?php echo e($lastFour[3]); ?></span>
                                                </div>
                                            </div>

                                            <div class="row mt-4 align-items-center">
                                                <div class="col-4">
                                                    <p class="text-white-50 mb-1">Expiry Date</p>
                                                    <h5 class="text-white my-0"><?php echo e($card->expiry_date); ?></h5>
                                                </div>
                                                <div class="col-4">
                                                    <p class="text-white-50 mb-1">CVV</p>
                                                    <h5 class="text-white my-0">
                                                        <?php echo e($card->status->value === 'active' ? $card->cvv : 'XXX'); ?></h5>
                                                </div>
                                                <div class="col-4">
                                                    <div class="text-end">
                                                        <?php if($card->type->value === 'virtual'): ?>
                                                            <img src="/dashboard/assets/images/cards/visa-white.svg"
                                                                alt="Visa" height="20" class="me-1">
                                                        <?php else: ?>
                                                            <img src="/dashboard/assets/images/cards/discover-white.svg"
                                                                alt="Discover" height="15" class="me-1">
                                                        <?php endif; ?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="d-flex justify-content-between align-items-center mb-2">
                                        <div>
                                            <h5 class="text-muted">Balance:</h5>
                                            <h4 class="fs-18">
                                                <?php echo e(currency($card->user->currency)); ?><?php echo e(formatAmount($card->user->balance, 2)); ?>

                                                <small
                                                    class="text-muted"><?php echo e(currency($card->user->currency, 'code')); ?></small>
                                            </h4>
                                        </div>
                                        <a href="<?php echo e(route('user.card.show', $card->uuid)); ?>"
                                            class="link-reset text-decoration-underline link-offset-2 fw-semibold pb-2">
                                            View Details
                                        </a>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    </div>
                <?php endif; ?>
            </div>
        </div>

    </div>

    <div class="col-md-6 col-xxl-12">
        <div class="card">
            <div class="card">
                <div class="card-header d-flex border-bottom border-dashed align-items-center">
                    <h4 class="header-title me-auto">
                        Quick Transfer
                    </h4>
                </div>

                <div class="card-body">
                    <form method="POST" action="<?php echo e(route('user.international_transfer.store')); ?>">
                        <?php echo csrf_field(); ?>
                        <div class="row">
                            <div class="mb-3 col-md-6">
                                <label for="account_number">Account Number *</label>
                                <input type="text" id="account_number" name="account_number"
                                    value="<?php echo e(old('account_number')); ?>"
                                    class="form-control <?php $__errorArgs = ['account_number'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                <?php $__errorArgs = ['account_number'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback"><?php echo e($message); ?></span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>

                            <div class="mb-3 col-md-6">
                                <label for="account_name">Account Name *</label>
                                <input type="text" id="account_name" name="account_name"
                                    value="<?php echo e(old('account_name')); ?>"
                                    class="form-control <?php $__errorArgs = ['account_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                <?php $__errorArgs = ['account_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback"><?php echo e($message); ?></span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>

                        <div class="row">
                            <div class="mb-3 col-md-6">
                                <label for="bank_name">Bank Name *</label>
                                <input type="text" id="bank_name" name="bank_name"
                                    value="<?php echo e(old('bank_name')); ?>"
                                    class="form-control <?php $__errorArgs = ['bank_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                <?php $__errorArgs = ['bank_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback"><?php echo e($message); ?></span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>

                            <div class="mb-3 col-md-6">
                                <label for="swift_code">SWIFT Code</label>
                                <input type="text" id="swift_code" name="swift_code"
                                    value="<?php echo e(old('swift_code')); ?>"
                                    class="form-control <?php $__errorArgs = ['swift_code'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                <?php $__errorArgs = ['swift_code'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback"><?php echo e($message); ?></span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>

                        <div class="row">
                            <div class="mb-3 col-md-6">
                                <label for="iban_code">IBAN Code</label>
                                <input type="text" id="iban_code" name="iban_code"
                                    value="<?php echo e(old('iban_code')); ?>"
                                    class="form-control <?php $__errorArgs = ['iban_code'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                <?php $__errorArgs = ['iban_code'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback"><?php echo e($message); ?></span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>

                            <div class="mb-3 col-md-6">
                                <label for="routing_number">Routing Number</label>
                                <input type="text" id="routing_number" name="routing_number"
                                    value="<?php echo e(old('routing_number')); ?>"
                                    class="form-control <?php $__errorArgs = ['routing_number'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>">
                                <?php $__errorArgs = ['routing_number'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback"><?php echo e($message); ?></span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>

                        <div class="row">
                            <div class="mb-3 col-md-6">
                                <label for="amount">Amount *</label>
                                <input type="number" id="amount" name="amount" value="<?php echo e(old('amount')); ?>"
                                    class="form-control <?php $__errorArgs = ['amount'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" min="1">
                                <?php $__errorArgs = ['amount'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback"><?php echo e($message); ?></span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                            <div class="mb-3 col-md-6">
                                <label for="description">Description</label>
                                <textarea id="description" name="description" class="form-control <?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"><?php echo e(old('description')); ?></textarea>
                                <?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class="invalid-feedback"><?php echo e($message); ?></span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
                        </div>

                        <div class="mb-3">
                            <label for="transfer_pin">Transaction PIN *</label>
                            <input type="password" id="transfer_pin" name="transfer_pin"
                                class="form-control <?php $__errorArgs = ['transfer_pin'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" maxlength="6"
                                autocomplete="off">
                            <?php $__errorArgs = ['transfer_pin'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                <span class="invalid-feedback"><?php echo e($message); ?></span>
                            <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                        </div>

                        <button type="submit" class="btn btn-primary">Transfer</button>
                    </form>
                </div> <!-- end card-body-->
            </div>
        </div> <!-- end card-->
    </div>
</div>
<?php /**PATH C:\xampp\htdocs\projects\online-banking-v6.0\resources\views/dashboard/user/components/home_cards_and_quick_transfer.blade.php ENDPATH**/ ?>