"use client"; import React, { useState, useRef } from "react"; import AppImage from "@/components/ui/AppImage"; import { ChevronLeftIcon, ChevronRightIcon } from "@/components/ui/Icons"; import Link from "next/link"; const spotlights = [ { name: "Vizrt", title: "From Start-Up to Global Powerhouse in Video in Just Two Decades", image: "https://www.avbeat.com/wp-content/uploads/michael-320x220.jpg", alt: "Vizrt company spotlight profile image", tag: "Company", href: "/news" }, { name: "Scott Freeman", title: "The Sherlock Holmes of Video Post-Production", image: "https://www.avbeat.com/wp-content/uploads/scott-freeman.jpg", alt: "Scott Freeman video post-production professional headshot", tag: "Profile", href: "/news" }, { name: "Al Roker", title: "A Weatherman Who Wears Many Hats", image: "https://www.avbeat.com/wp-content/uploads/al-roker2-320x220.jpg", alt: "Al Roker television weatherman and broadcaster portrait", tag: "Profile", href: "/news" }, { name: "Michael Kammes", title: "Shaping the Best Workflow for Media Organizations", image: "https://www.avbeat.com/wp-content/uploads/kammes-2-320x220.jpg", alt: "Michael Kammes media workflow specialist headshot", tag: "Profile", href: "/news" }, { name: "Gary Trenda", title: "Top Frequency \'Traffic Cop\' for Wireless Microphones", image: "https://www.avbeat.com/wp-content/uploads/gary-320x220.jpg", alt: "Gary Trenda wireless microphone frequency coordinator portrait", tag: "Profile", href: "/news" }, { name: "Jim Anderson & Ulrike Schwarz", title: "Partners in Immersive Sound", image: "https://www.avbeat.com/wp-content/uploads/urike-320x220.jpg", alt: "Jim Anderson and Ulrike Schwarz immersive sound designers", tag: "Profile", href: "/news" }, { name: "Sound Effects", title: "Creating Cutting-Edge New Sound Effects — Film by Film", image: "https://www.avbeat.com/wp-content/uploads/mark-spot-320x215.jpg", alt: "Sound effects creation for film and broadcast production", tag: "Feature", href: "/gear" }, { name: "Libby Casey", title: "Pioneering Television Broadcasting at the Washington Post", image: "https://www.avbeat.com/wp-content/uploads/spotlight-320x215.jpg", alt: "Libby Casey television broadcaster Washington Post studio", tag: "Profile", href: "/news" }, { name: "NBCU Academy", title: "Preparing Students for Careers in News, Technology and Broadcast", image: "https://www.avbeat.com/wp-content/uploads/nbcu-spotlight-320x215.jpg", alt: "NBCU Academy students learning broadcast journalism and technology", tag: "Education", href: "/about" }, { name: "BirdDog", title: "Simplifying Global Television Production", image: "https://www.avbeat.com/wp-content/uploads/bird-sptfeat.jpg", alt: "BirdDog broadcast production technology company spotlight", tag: "Company", href: "/news" }, { name: "Michael Cioni", title: "Speeding Digital Cinema with Camera to Cloud", image: "https://www.avbeat.com/wp-content/uploads/michael-copy-320x220.jpg", alt: "Michael Cioni digital cinema and camera to cloud technology expert", tag: "Profile", href: "/technology" }, { name: "Jeff Greenberg", title: "Finding Workarounds for Gaps in the Video Production Workflow", image: "https://www.avbeat.com/wp-content/uploads/greenberg-320x215.jpg", alt: "Jeff Greenberg video production workflow consultant headshot", tag: "Profile", href: "/technology" } ]; const VISIBLE = 4; export default function SpotlightCarousel() { const [startIndex, setStartIndex] = useState(0); const [animating, setAnimating] = useState(false); const prevBtnRef = useRef(null); const nextBtnRef = useRef(null); const total = spotlights.length; const visible = spotlights.slice(startIndex, startIndex + VISIBLE); const visibleItems = visible.length < VISIBLE ? [...visible, ...spotlights.slice(0, VISIBLE - visible.length)] : visible; const go = (dir: 1 | -1) => { if (animating) return; setAnimating(true); setStartIndex((prev) => (prev + dir * VISIBLE + total) % total); setTimeout(() => setAnimating(false), 350); }; // Arrow key navigation on carousel container const handleCarouselKeyDown = (e: React.KeyboardEvent) => { if (e.key === "ArrowLeft") { e.preventDefault(); go(-1); prevBtnRef.current?.focus(); } else if (e.key === "ArrowRight") { e.preventDefault(); go(1); nextBtnRef.current?.focus(); } }; return (
{/* Header */}
Spotlight Industry Personalities & Companies
{/* Cards */}
{visibleItems.map((item, i) => ( = 3 ? "hidden lg:block" : i >= 2 ? "hidden md:block" : "" }`} style={{ animationDelay: `${i * 50}ms` }} aria-label={`${item.name}: ${item.title}`}>
{item.tag}

{item.name}

{item.title}

))}
{/* Dots */}
{Array.from({ length: Math.ceil(total / VISIBLE) }).map((_, i) => (
); }