@props([ 'url' => null, 'name' => 'User', 'size' => 35, 'circle' => true, 'status' => null, // 'online', 'offline', 'busy', etc. ]) @php $classes = $circle ? 'rounded-circle' : 'rounded'; $style = "width:{$size}px; height:{$size}px; object-fit:cover;"; $initial = strtoupper(substr($name, 0, 1)); // Deterministic Color Generation (Hash del nombre para que siempre sea el mismo color) $colors = ['primary', 'success', 'danger', 'warning', 'info', 'secondary', 'indigo', 'purple', 'pink', 'teal']; $hash = crc32($name); $color = $colors[abs($hash) % count($colors)]; // Status Indicator $statusColor = match($status) { 'online' => '#28a745', 'offline' => '#6c757d', 'busy' => '#dc3545', 'away' => '#ffc107', default => null }; @endphp