<?php $attributes ??= new \Illuminate\View\ComponentAttributeBag;

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'user' => null,
]));

foreach ($attributes->all() as $__key => $__value) {
    if (in_array($__key, $__propNames)) {
        $$__key = $$__key ?? $__value;
    } else {
        $__newAttributes[$__key] = $__value;
    }
}

$attributes = new \Illuminate\View\ComponentAttributeBag($__newAttributes);

unset($__propNames);
unset($__newAttributes);

foreach (array_filter(([
    'user' => null,
]), 'is_string', ARRAY_FILTER_USE_KEY) as $__key => $__value) {
    $$__key = $$__key ?? $__value;
}

$__defined_vars = get_defined_vars();

foreach ($attributes->all() as $__key => $__value) {
    if (array_key_exists($__key, $__defined_vars)) unset($$__key);
}

unset($__defined_vars, $__key, $__value); ?>

<div class="card shadow-sm border-0 mb-4">
    <div class="card-header border-bottom">
        <div class="d-flex align-items-center justify-content-between">
            <h5 class="mb-0 fw-semibold">
                <i class="bi bi-wallet2 text-primary me-1"></i>
                Account Balances
            </h5>
        </div>
    </div>

    <div class="card-body">

        <!-- Balance Grid -->
        <div class="row g-4">

            <!-- Live Balance -->
            <div class="col-md-6 col-lg-4">
                <div class="border rounded-3 p-3 h-100">
                    <div class="d-flex justify-content-between align-items-center mb-2">
                        <span class="text-muted fw-medium">Live Balance</span>
                        <i class="bi bi-cash-stack text-success"></i>
                    </div>

                    <h4 class="fw-bold mb-0">
                        <?php echo e(currency($user->currency)); ?><?php echo e(formatAmount($user->balance)); ?>

                    </h4>

                    <small class="text-muted">
                        <?php echo e(currency($user->currency, 'code')); ?> Wallet
                    </small>
                </div>
            </div>

            <!-- Demo Balance -->
            <div class="col-md-6 col-lg-4">
                <div class="border rounded-3 p-3 h-100">
                    <div class="d-flex justify-content-between align-items-center mb-2">
                        <span class="text-muted fw-medium">Demo Balance</span>
                        <i class="bi bi-controller text-primary"></i>
                    </div>

                    <h4 class="fw-bold mb-0">
                        <?php echo e(currency($user->currency)); ?><?php echo e(formatAmount($user->demo_balance)); ?>

                    </h4>

                    <small class="text-muted">
                        Practice Funds
                    </small>
                </div>
            </div>

            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(request()->routeIs('admin.user.profit_balance.index') || request()->routeIs('admin.user.balance_management.index')): ?>
                <!-- Profit Balance -->
                <div class="col-md-6 col-lg-4">
                    <div class="border rounded-3 p-3 h-100">
                        <div class="d-flex justify-content-between align-items-center mb-2">
                            <span class="text-muted fw-medium">Profit Balance</span>
                            <i class="bi bi-currency-dollar text-success"></i>
                        </div>

                        <h4 class="fw-bold mb-0">
                            <?php echo e(currency($user->currency)); ?><?php echo e(formatAmount($user->profit_balance)); ?>

                        </h4>

                        <small class="text-muted">
                            Profit Funds
                        </small>
                    </div>
                </div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>

            <!-- Slot for Future Columns -->
            <?php echo e($slot); ?>


        </div>
    </div>
</div>
<?php /**PATH C:\xampp\htdocs\projects\broker-v6.0\resources\views/components/dashboard/available_balance.blade.php ENDPATH**/ ?>