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

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'title' => '',
    'value' => 0,
    'valueId' => null,
    'subtext' => '',
    'comparison' => null,
    'trend' => 'neutral',
    'badge' => null,
    'iconBg' => 'from-indigo-500 to-cyan-500',
    'icon' => null,
    'spark' => null,
    'sparkColor' => '#6366f1',
    'sparkFill' => 'rgba(99, 102, 241, 0.14)',
    'href' => 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(([
    'title' => '',
    'value' => 0,
    'valueId' => null,
    'subtext' => '',
    'comparison' => null,
    'trend' => 'neutral',
    'badge' => null,
    'iconBg' => 'from-indigo-500 to-cyan-500',
    'icon' => null,
    'spark' => null,
    'sparkColor' => '#6366f1',
    'sparkFill' => 'rgba(99, 102, 241, 0.14)',
    'href' => 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); ?>

<?php
    $trendStyles = [
        'up' => ['color' => 'text-emerald-600 dark:text-emerald-400', 'bg' => 'bg-emerald-500/10', 'border' => 'border-emerald-500/20'],
        'down' => ['color' => 'text-rose-600 dark:text-rose-400', 'bg' => 'bg-rose-500/10', 'border' => 'border-rose-500/20'],
        'neutral' => ['color' => 'text-slate-500 dark:text-slate-400', 'bg' => 'bg-slate-500/10', 'border' => 'border-slate-500/20'],
    ];
    $tStyle = $trendStyles[$trend] ?? $trendStyles['neutral'];

    $tag = $href ? 'a' : 'div';
    $hrefAttr = $href ? 'href="' . e($href) . '"' : '';
?>

<<?php echo $tag; ?> <?php echo $hrefAttr; ?> class="pb-card pb-card-hover pb-fade-up block p-5">
    <div class="flex items-start justify-between gap-3">
        <div class="flex items-center gap-3 min-w-0">
            <span class="flex h-10 w-10 items-center justify-center rounded-xl bg-gradient-to-br <?php echo e($iconBg); ?> text-white shadow-[0_8px_18px_-8px_rgba(99,102,241,0.55),inset_0_1px_0_rgba(255,255,255,0.18)] shrink-0">
                <?php echo e($icon); ?>

            </span>
            <div class="min-w-0">
                <p class="text-[10px] font-bold uppercase tracking-[0.14em] text-slate-500 dark:text-slate-400 truncate"><?php echo e($title); ?></p>
                <?php if($badge): ?>
                    <span class="mt-0.5 inline-block text-[10px] font-medium text-slate-400 dark:text-slate-500 truncate"><?php echo e($badge); ?></span>
                <?php endif; ?>
            </div>
        </div>

        <?php if($comparison !== null): ?>
            <span class="inline-flex items-center gap-1 rounded-md border <?php echo e($tStyle['border']); ?> <?php echo e($tStyle['bg']); ?> px-1.5 py-0.5 text-[10px] font-bold <?php echo e($tStyle['color']); ?>">
                <?php if($trend === 'up'): ?>
                    <svg class="h-3 w-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round">
                        <polyline points="6 15 12 9 18 15"/>
                    </svg>
                <?php elseif($trend === 'down'): ?>
                    <svg class="h-3 w-3" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round">
                        <polyline points="6 9 12 15 18 9"/>
                    </svg>
                <?php endif; ?>
                <?php echo e($comparison); ?>

            </span>
        <?php endif; ?>
    </div>

    <div class="mt-4 flex items-end justify-between gap-3">
        <div class="min-w-0">
            <p <?php if($valueId): ?> id="<?php echo e($valueId); ?>" <?php endif; ?> class="text-[26px] font-extrabold leading-none tracking-tight text-slate-900 dark:text-white truncate">
                <?php echo e($value); ?>

            </p>
            <?php if($subtext): ?>
                <p class="mt-1.5 text-[11px] text-slate-500 dark:text-slate-400 truncate"><?php echo e($subtext); ?></p>
            <?php endif; ?>
        </div>

        <?php if($spark !== null): ?>
            <div class="shrink-0 -mb-1">
                <?php if (isset($component)) { $__componentOriginal87107310305910649180f68a39fd74db = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal87107310305910649180f68a39fd74db = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.dashboard.sparkline','data' => ['data' => $spark,'stroke' => $sparkColor,'fill' => $sparkFill]] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('dashboard.sparkline'); ?>
<?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(['data' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($spark),'stroke' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($sparkColor),'fill' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($sparkFill)]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal87107310305910649180f68a39fd74db)): ?>
<?php $attributes = $__attributesOriginal87107310305910649180f68a39fd74db; ?>
<?php unset($__attributesOriginal87107310305910649180f68a39fd74db); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal87107310305910649180f68a39fd74db)): ?>
<?php $component = $__componentOriginal87107310305910649180f68a39fd74db; ?>
<?php unset($__componentOriginal87107310305910649180f68a39fd74db); ?>
<?php endif; ?>
            </div>
        <?php endif; ?>
    </div>
</<?php echo $tag; ?>>
<?php /**PATH C:\xampp\htdocs\ispbilling\resources\views/components/dashboard/kpi-card.blade.php ENDPATH**/ ?>