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

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames((['label', 'value', 'sub' => null, 'colour' => 'gray', '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((['label', 'value', 'sub' => null, 'colour' => 'gray', '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
$bg = match($colour) {
    'green'  => 'bg-green-50 border-green-100',
    'blue'   => 'bg-blue-50 border-blue-100',
    'amber'  => 'bg-amber-50 border-amber-100',
    'red'    => 'bg-red-50 border-red-100',
    'teal'   => 'bg-teal-50 border-teal-100',
    'purple' => 'bg-purple-50 border-purple-100',
    default  => 'bg-white border-gray-100',
};
$tag = $href ? 'a' : 'div';
?>

<<?php echo e($tag); ?> <?php if($href): ?> href="<?php echo e($href); ?>" <?php endif; ?>
   class="rounded-xl border p-5 <?php echo e($bg); ?> <?php if($href): ?> hover:shadow-md transition-shadow <?php endif; ?>">
    <p class="text-sm font-medium text-gray-500"><?php echo e($label); ?></p>
    <p class="mt-1 text-2xl font-bold text-gray-900"><?php echo e($value); ?></p>
    <?php if($sub): ?>
        <p class="mt-1 text-xs text-gray-500"><?php echo e($sub); ?></p>
    <?php endif; ?>
</<?php echo e($tag); ?>>
<?php /**PATH C:\laragon\www\farm\resources\views\components\stat-card.blade.php ENDPATH**/ ?>