{{-- Empty State Component - Shows when there's no data Usage: --}} @props([ 'icon' => '📭', 'title' => 'Aucun élément', 'message' => null, 'primaryAction' => null, 'secondaryAction' => null, 'tips' => [], 'color' => 'blue', // Legacy support 'actionUrl' => null, 'actionText' => 'Commencer', 'secondaryUrl' => null, 'secondaryText' => null ]) @php $colorClasses = [ 'blue' => ['bg' => 'bg-blue-100', 'border' => 'border-blue-200', 'text' => 'text-blue-600', 'button' => 'from-blue-500 to-indigo-600 hover:from-blue-600 hover:to-indigo-700'], 'green' => ['bg' => 'bg-green-100', 'border' => 'border-green-200', 'text' => 'text-green-600', 'button' => 'from-green-500 to-emerald-600 hover:from-green-600 hover:to-emerald-700'], 'purple' => ['bg' => 'bg-purple-100', 'border' => 'border-purple-200', 'text' => 'text-purple-600', 'button' => 'from-purple-500 to-indigo-600 hover:from-purple-600 hover:to-indigo-700'], 'orange' => ['bg' => 'bg-orange-100', 'border' => 'border-orange-200', 'text' => 'text-orange-600', 'button' => 'from-orange-500 to-red-600 hover:from-orange-600 hover:to-red-700'], 'red' => ['bg' => 'bg-red-100', 'border' => 'border-red-200', 'text' => 'text-red-600', 'button' => 'from-red-500 to-pink-600 hover:from-red-600 hover:to-pink-700'], ]; $colors = $colorClasses[$color] ?? $colorClasses['blue']; @endphp
@if(strlen($icon) <= 3 && preg_match('/[\x{1F300}-\x{1F9FF}]/u', $icon)) {{ $icon }} @else @endif

{{ $title }}

{{ $message ?? $slot }}

@if(!empty($tips))

Conseils pour bien démarrer

    @foreach($tips as $tip)
  • {{ $tip }}
  • @endforeach
@endif
@if($primaryAction) {{ $primaryAction['label'] }} @elseif($actionUrl) {{ $actionText }} @endif @if($secondaryAction) {{ $secondaryAction['label'] }} @elseif($secondaryUrl) {{ $secondaryText }} @endif