@props(['slides' => null]) @php // Build slides from /public/assets/img/slider; fallback to curated defaults $defaultSlides = [ [ 'image' => 'slide1.jpg', 'author' => 'ARUKU R&B', 'title' => 'REVOLUTIONIZE', 'topic' => 'FOOTBALL GAMING', 'description' => 'Join thousands of managers building championship teams, trading NFT players, and earning real rewards in the most advanced football gaming ecosystem ever created.', 'primaryBtn' => 'Play To Earn', 'secondaryBtn' => 'Explore Game', 'primaryRoute' => 'contact', 'secondaryRoute' => 'contact' ], [ 'image' => 'slide2.jpg', 'author' => 'ARUKU R&B', 'title' => 'OWN YOUR', 'topic' => 'DIGITAL ASSETS', 'description' => 'Experience true ownership with blockchain-powered NFT players, stadiums, and achievements. Trade, sell, or transfer your digital assets with complete control.', 'primaryBtn' => 'Join Waitlist', 'secondaryBtn' => 'View Marketplace', 'primaryRoute' => 'contact', 'secondaryRoute' => 'contact' ], [ 'image' => 'slide3.jpg', 'author' => 'ARUKU R&B', 'title' => 'AI-POWERED', 'topic' => 'CHAMPIONSHIPS', 'description' => 'Compete in intelligent tournaments with advanced AI opponents, dynamic match experiences, and real cryptocurrency rewards in our gaming ecosystem.', 'primaryBtn' => 'Join Our Discord', 'secondaryBtn' => 'Learn More', 'primaryRoute' => 'contact', 'secondaryRoute' => 'contact' ], [ 'image' => 'slide4.jpg', 'author' => 'ARUKU R&B', 'title' => 'GLOBAL', 'topic' => 'COMMUNITY', 'description' => 'Connect with football managers worldwide in our thriving blockchain gaming community. Share strategies, trade assets, and compete for glory.', 'primaryBtn' => 'Join Community', 'secondaryBtn' => 'Explore Features', 'primaryRoute' => 'contact', 'secondaryRoute' => 'contact' ] ]; $dir = public_path('assets/img/slider'); $extensions = ['jpg','jpeg','png','webp','gif','avif']; $found = []; if (is_dir($dir)) { foreach (scandir($dir) as $file) { if ($file === '.' || $file === '..') continue; $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); if (in_array($ext, $extensions, true)) $found[] = $file; } natsort($found); $found = array_values($found); } $mapped = []; if (!empty($found)) { foreach ($found as $i => $file) { $meta = $defaultSlides[$i % count($defaultSlides)]; $meta['image'] = $file; // use actual filename in slider dir $mapped[] = $meta; } } $carouselSlides = $slides ?? (!empty($mapped) ? $mapped : $defaultSlides); @endphp