
<?php $__env->startSection('content'); ?>
    <div class="page-container">

        <div class="page-title-head d-flex align-items-sm-center flex-sm-row flex-column gap-2">
            <div class="flex-grow-1">
                <h4 class="fs-18 fw-semibold mb-0"><?php echo e($title); ?></h4>
            </div>

            <div class="text-end">
                <?php if (isset($component)) { $__componentOriginalf249638ac7504c50bf0259c0cb71919d = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf249638ac7504c50bf0259c0cb71919d = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dashboard.user.breadcrumbs','data' => ['breadcrumbs' => $breadcrumbs]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dashboard.user.breadcrumbs'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['breadcrumbs' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($breadcrumbs)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf249638ac7504c50bf0259c0cb71919d)): ?>
<?php $attributes = $__attributesOriginalf249638ac7504c50bf0259c0cb71919d; ?>
<?php unset($__attributesOriginalf249638ac7504c50bf0259c0cb71919d); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf249638ac7504c50bf0259c0cb71919d)): ?>
<?php $component = $__componentOriginalf249638ac7504c50bf0259c0cb71919d; ?>
<?php unset($__componentOriginalf249638ac7504c50bf0259c0cb71919d); ?>
<?php endif; ?>
            </div>
        </div>

        <div class="row">
            <div class="col-xl-12 col-lg-12">
                <?php if (isset($component)) { $__componentOriginal87dd96fabcb1ce9254eda7ff7199227b = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal87dd96fabcb1ce9254eda7ff7199227b = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dashboard.admin.card','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dashboard.admin.card'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>

                    <div class="container-fluid">

                        <!-- Header -->
                        <div class="d-flex justify-content-between align-items-center mb-4">
                            <div>
                                <h3 class="fw-bold"><i class="fa-solid fa-credit-card me-2 text-primary"></i> Card Details
                                </h3>
                                <p class="text-muted mb-0">Detailed information about your virtual card</p>
                            </div>
                            <a href="<?php echo e(route('user.card.index')); ?>" class="btn btn-outline-secondary btn-sm">
                                <i class="fa-solid fa-arrow-left me-1"></i> Back to Cards
                            </a>
                        </div>

                        <!-- Card Summary -->
                        <div class="card shadow-sm border-0 mb-4">
                            <div class="card-body">
                                <div class="row g-4 align-items-center">
                                    <div class="col-md-8">
                                        <h4 class="fw-bold mb-1"><?php echo e($card->card_type); ?> • <?php echo e($card->card_level); ?></h4>
                                        <p class="mb-2 text-muted">
                                            Reference ID: <span
                                                class="fw-bold">#<?php echo e($card->reference_id ?? $card->id); ?></span>
                                        </p>
                                        <p class="mb-0">
                                            <span class="<?php echo e($card->status->badge()); ?>">
                                                <?php echo e($card->status->label()); ?>

                                            </span>
                                        </p>
                                    </div>
                                    <div class="col-md-4 text-md-end">
                                        <div class="bg-light p-3 rounded text-center">
                                            <div
                                                class="fw-bold fs-5 d-flex align-items-center justify-content-center gap-2">
                                                <span id="maskedCard">**** **** ****
                                                    <?php echo e(substr($card->card_number, -4)); ?></span>
                                                <span id="fullCard" class="d-none"><?php echo e($card->card_number); ?></span>
                                                <button class="btn btn-sm btn-light rounded-circle" id="toggleCard"
                                                    type="button">
                                                    <i class="fa-solid fa-eye"></i>
                                                </button>
                                            </div>
                                            <small class="text-muted">Expires
                                                <?php echo e(formatDate($card->expiry_date) ?? 'N/A'); ?></small>
                                            <br>
                                            <small class="text-muted">CVV: <?php echo e($card->cvv ?? '***'); ?></small>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- Card Information -->
                        <div class="row g-4">
                            <!-- Card Details -->
                            <div class="col-md-6">
                                <div class="card border-0 shadow-sm">
                                    <div class="card-header bg-light">
                                        <h5 class="mb-0 fw-bold"><i class="fa-solid fa-id-card me-2 text-primary"></i> Card
                                            Information</h5>
                                    </div>
                                    <div class="card-body">
                                        <p><strong>Type:</strong> <?php echo e($card->card_type); ?></p>
                                        <p><strong>Level:</strong> <?php echo e($card->card_level); ?></p>
                                        <p><strong>Currency:</strong> <?php echo e(cardCurrency($card->currency, 'name')); ?></p>
                                        <p><strong>Daily Limit:</strong>
                                            <?php echo e(cardCurrency($card->currency)); ?><?php echo e(formatAmount($card->daily_limit)); ?></p>
                                    </div>
                                </div>
                            </div>

                            <!-- Billing Information -->
                            <div class="col-md-6">
                                <div class="card border-0 shadow-sm">
                                    <div class="card-header bg-light">
                                        <h5 class="mb-0 fw-bold"><i class="fa-solid fa-file-invoice me-2 text-primary"></i>
                                            Billing Information</h5>
                                    </div>
                                    <div class="card-body">
                                        <p><strong>Cardholder:</strong> <?php echo e($card->card_holder_name); ?></p>
                                        <p><strong>Address:</strong> <?php echo e($card->billing_address); ?></p>
                                        <p><strong>City:</strong> <?php echo e($card->city ?? '-'); ?></p>
                                        <p><strong>ZIP / Postal Code:</strong> <?php echo e($card->zip ?? '-'); ?></p>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal87dd96fabcb1ce9254eda7ff7199227b)): ?>
<?php $attributes = $__attributesOriginal87dd96fabcb1ce9254eda7ff7199227b; ?>
<?php unset($__attributesOriginal87dd96fabcb1ce9254eda7ff7199227b); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal87dd96fabcb1ce9254eda7ff7199227b)): ?>
<?php $component = $__componentOriginal87dd96fabcb1ce9254eda7ff7199227b; ?>
<?php unset($__componentOriginal87dd96fabcb1ce9254eda7ff7199227b); ?>
<?php endif; ?>
            </div>
        </div>
    </div>
    <?php $__env->startPush('scripts'); ?>
        <script>
            document.addEventListener("DOMContentLoaded", function() {
                const toggleBtn = document.getElementById("toggleCard");
                const maskedCard = document.getElementById("maskedCard");
                const fullCard = document.getElementById("fullCard");

                toggleBtn.addEventListener("click", function() {
                    maskedCard.classList.toggle("d-none");
                    fullCard.classList.toggle("d-none");

                    const icon = this.querySelector("i");
                    if (fullCard.classList.contains("d-none")) {
                        icon.classList.remove("fa-eye-slash");
                        icon.classList.add("fa-eye");
                    } else {
                        icon.classList.remove("fa-eye");
                        icon.classList.add("fa-eye-slash");
                    }
                });
            });
        </script>
    <?php $__env->stopPush(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('dashboard.user.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\projects\online-banking-v7.0\resources\views/dashboard/user/card/show.blade.php ENDPATH**/ ?>