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

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['label', 'value', 'icon' => 'fa-solid fa-chart-simple', 'accent' => 'champagne']));

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((['label', 'value', 'icon' => 'fa-solid fa-chart-simple', 'accent' => 'champagne']), '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); ?>
<?php
    $accents = [
        'champagne' => 'bg-gradient-to-br from-champagne/25 to-champagne-light/10 text-champagne-light',
        'maroon' => 'bg-maroon/10 text-maroon',
        'success' => 'bg-success/10 text-success',
        'warning' => 'bg-warning/10 text-warning',
    ];
    // Only plain integers/floats get the count-up treatment — pre-formatted
    // strings (currency, commas) render statically so they're never wrong.
    $numeric = is_numeric($value);
?>

<div class="group rounded-2xl border border-black/5 bg-white p-5 shadow-[var(--shadow-soft)] transition-all duration-300 hover:-translate-y-1 hover:shadow-[var(--shadow-card)] hover:border-champagne/20">
    <div class="flex items-center gap-3">
        <div class="flex h-11 w-11 shrink-0 items-center justify-center rounded-xl text-base transition-transform duration-300 group-hover:scale-110 <?php echo e($accents[$accent] ?? $accents['champagne']); ?>">
            <i class="<?php echo e($icon); ?>"></i>
        </div>
        <div class="min-w-0">
            <p class="truncate text-xs font-medium uppercase tracking-wide text-ink/45"><?php echo e($label); ?></p>
            <?php if($numeric): ?>
                <p class="text-2xl font-bold tabular-nums text-ink" data-counter="<?php echo e($value); ?>"><?php echo e(number_format($value)); ?></p>
            <?php else: ?>
                <p class="text-2xl font-bold tabular-nums text-ink"><?php echo e($value); ?></p>
            <?php endif; ?>
        </div>
    </div>
</div>
<?php /**PATH G:\Projects\ecommerce\resources\views/components/admin/stat-card.blade.php ENDPATH**/ ?>