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

$__newAttributes = [];
$__propNames = \Illuminate\View\ComponentAttributeBag::extractPropNames(([
    'title' => null,
    'subtitle' => null,
    'actions' => null,
    'tone' => null,
    'flush' => false,
]));

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' => null,
    'subtitle' => null,
    'actions' => null,
    'tone' => null,
    'flush' => false,
]), '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
    /*
     | Only `danger` gets a coloured edge.
     |
     | An amber-outlined card sitting beside a red-outlined one reads as two
     | warnings of similar weight, and the eye stops separating them. A password
     | reset is consequential but reversible; a delete is not. The border is
     | reserved for the irreversible one, and `warning` says its piece in the
     | title alone.
     */
    $toneClass = $tone === 'danger' ? 'border-danger-subtle' : '';

    $titleClass = match ($tone) {
        'danger' => 'text-danger',
        'warning' => 'text-warning-emphasis',
        default => '',
    };
?>

<div <?php echo e($attributes->merge(['class' => trim('card '.$toneClass)])); ?>>
    <?php if($title): ?>
        <div class="card-header">
            <div class="min-width-0">
                <h2 class="ams-section-title <?php echo e($titleClass); ?>"><?php echo e($title); ?></h2>

                <?php if($subtitle): ?>
                    <p class="ams-section-subtitle"><?php echo e($subtitle); ?></p>
                <?php endif; ?>
            </div>

            <?php if($actions): ?>
                <div class="d-flex flex-wrap gap-2 ams-no-print">
                    <?php echo e($actions); ?>

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

    <div class="<?php echo e($flush ? '' : 'card-body'); ?>">
        <?php echo e($slot); ?>

    </div>
</div>
<?php /**PATH /Users/aviii/Desktop/Aumni AMS/resources/views/components/panel.blade.php ENDPATH**/ ?>