@props([ 'type' => 'info', 'icon' => null, 'withClose' => true, 'onlyBorders' => false ]) @php $iconPath = $icon ?? match ($type) { 'success' => 'ph.regular.check-circle', 'error' => 'ph.regular.x-circle', 'warning' => 'ph.regular.warning-circle', 'info' => 'ph.regular.info', default => 'ph.regular.info', }; $borderClass = $onlyBorders ? 'border' : ''; @endphp
merge(['class' => "alert alert-{$type} {$borderClass}", 'role' => 'alert']) }}>
{{ $slot }}
@if (filter_var($withClose, FILTER_VALIDATE_BOOLEAN)) @endif