@props([
'name' => 'Team Member',
'role' => 'Role',
'bio' => 'Bio description for this team member.',
'image' => null,
'twitter' => null, // X.com profile URL
'linkedin' => null, // LinkedIn profile URL
'email' => null, // Optional email
'featured' => false, // Highlight this team member
'index' => 0 // For stagger animations
])
@php
// Generate fallback avatar if no image provided
$avatarUrl = $image ?? 'https://ui-avatars.com/api/?name=' . urlencode($name) . '&size=400&background=1f2937&color=ffffff&format=svg';
// Clean and validate social URLs
$twitterUrl = $twitter ? (str_starts_with($twitter, 'http') ? $twitter : 'https://x.com/' . ltrim($twitter, '@')) : null;
$linkedinUrl = $linkedin ? (str_starts_with($linkedin, 'http') ? $linkedin : 'https://linkedin.com/in/' . $linkedin) : null;
// Generate unique ID for this card
$cardId = 'team-card-' . md5($name . $role);
@endphp
@once
@push('scripts')
@endpush
@endonce