"use client"; import React, { useState, useEffect, useCallback } from "react"; import AppImage from "@/components/ui/AppImage"; import { ArrowRightIcon } from "@/components/ui/Icons"; import Link from "next/link"; // Fixed hero — only changes when manually updated const hero = { title: "Sony BRC-AM7 + HXC-FZ90: Better Together in the Field", category: "BROADCAST", excerpt: "Sony's latest camera pairing delivers unprecedented flexibility for field production teams, combining 4K HDR capture with compact form factors designed for the realities of live broadcast.", image: "https://www.avbeat.com/wp-content/uploads/BRC-AM7_012-Mid.png", alt: "Sony BRC-AM7 broadcast camera in field setting", slug: "sony-brc-am7-hxc-fz90", }; // Last 15 stories from the homepage feed — these rotate in the secondary cards const rotatingStories = [ { title: "Sony\'s BVM-HX1710: The Compact Powerhouse Changing How Broadcast & Post See Their Work", category: "POST PRODUCTION", image: "https://www.avbeat.com/wp-content/uploads/bvmhx1710_3q_250131_02-copy-scaled.png", alt: "Sony BVM-HX1710 broadcast monitor three-quarter view", slug: "sony-bvm-hx1710", }, { title: "The Top 5 Challenges in MCRs & NOCs—And How to Stay Ahead", category: "BROADCAST", image: "https://www.avbeat.com/wp-content/uploads/data-insight-ip-monitoring-1024x597.pngw3_.webp", alt: "IP monitoring dashboard showing data insights for MCR operations", slug: "top-5-challenges-mcrs-nocs", }, { title: "TESSERA SQ200: THE NEW PACE-SETTER IN LED PROCESSING", category: "FEATURED", image: "https://www.avbeat.com/wp-content/uploads/Hero-Image_SQ200-Gen-3_Sep2025_CMYK.jpg", alt: "Tessera SQ200 Gen 3 LED processor hero image", slug: "tessera-sq200-led-processing", }, { title: "Backlight adds real-time collaboration to Iconik, AI-powered livestreams to Wildmoka at IBC2025", category: "BROADCAST", image: "https://www.avbeat.com/wp-content/uploads/Iconik-scaled.jpeg", alt: "Iconik media asset management platform interface", slug: "backlight-iconik-wildmoka-ibc2025", }, { title: "Telestream Expands Its Cloud Services with the Introduction of UP", category: "BROADCAST", image: "/assets/images/article-placeholder.svg", alt: "Cloud services infrastructure for broadcast production environments", slug: "telestream-expands-cloud-services-up", }, { title: "Operative Launches AOS Configuration for Digital-First Monetization", category: "BROADCAST", image: "/assets/images/article-placeholder.svg", alt: "Digital monetization analytics dashboard for broadcast advertising", slug: "operative-launches-aos-configuration", }, { title: "Calrec Redefines Broadcast Workflows at NAB 2026 with its Most Powerful Audio Lineup Yet", category: "BROADCAST", image: "/assets/images/article-placeholder.svg", alt: "Calrec audio mixing console for broadcast production at NAB 2026", slug: "calrec-redefines-broadcast-workflows-nab-2026", }, { title: "Ease Live Powers Interactive Premier Padel Experiences on Red Bull TV as Viewership Surges 30%", category: "BROADCAST", image: "/assets/images/article-placeholder.svg", alt: "Interactive sports broadcast experience on streaming platform", slug: "ease-live-premier-padel-red-bull-tv", }, { title: "From Metadata to Meaning: Why Semantic Intelligence Is Media\'s Next Competitive Advantage", category: "FEATURED", image: "/assets/images/article-placeholder.svg", alt: "Media metadata intelligence and content analytics visualization", slug: "from-metadata-to-meaning-semantic-intelligence", }, { title: "Mediagenix Title Management Accelerates Content Monetization Through Advanced Semantic Intelligence", category: "POST PRODUCTION", image: "/assets/images/article-placeholder.svg", alt: "Content management system for media title management and monetization", slug: "mediagenix-title-management", }, { title: "Emergent Launches Fusion: The \'Interactive Anything\' Platform Transforming Data-Driven Storytelling", category: "BROADCAST", image: "/assets/images/article-placeholder.svg", alt: "Interactive data storytelling platform for broadcast and enterprise use", slug: "emergent-launches-fusion-platform", }, { title: "Matrox Video Enables the Next Era of Software-Defined Media Production at NAB 2026", category: "BROADCAST", image: "/assets/images/article-placeholder.svg", alt: "Matrox video production hardware and software at NAB 2026 exhibition", slug: "matrox-video-software-defined-nab-2026", }, { title: "Video is King: 2026 Iconik Media Stats Report Finds Video Consumes 64% of Storage Needs", category: "FEATURED", image: "/assets/images/article-placeholder.svg", alt: "Video storage statistics and media asset management data visualization", slug: "video-is-king-2026-iconik-media-stats", }, { title: "QuickLink\'s Latest StudioEdge Models to Make North American Debut at NAB 2026", category: "BROADCAST", image: "/assets/images/article-placeholder.svg", alt: "QuickLink StudioEdge broadcast production equipment at NAB exhibition", slug: "quicklink-studioedge-nab-2026", }, { title: "Utah Scientific Expands Technology Partner Program With Integrations From Audinate, Bitfocus, and Skaarhoj", category: "BROADCAST", image: "/assets/images/article-placeholder.svg", alt: "Broadcast routing and control system technology partner integration", slug: "utah-scientific-partner-program", }, ]; // Number of secondary cards visible at once const CARDS_PER_PAGE = 4; // Auto-rotate interval in ms const AUTO_ROTATE_MS = 5000; export default function FeaturedBento() { // offset = index of first visible secondary card const [offset, setOffset] = useState(0); const [paused, setPaused] = useState(false); const maxOffset = rotatingStories?.length - CARDS_PER_PAGE; const goNext = useCallback(() => { setOffset((prev) => (prev >= maxOffset ? 0 : prev + 1)); }, [maxOffset]); const goPrev = useCallback(() => { setOffset((prev) => (prev <= 0 ? maxOffset : prev - 1)); }, [maxOffset]); // Auto-rotate useEffect(() => { if (paused) return; const timer = setInterval(goNext, AUTO_ROTATE_MS); return () => clearInterval(timer); }, [paused, goNext]); const visibleCards = rotatingStories?.slice(offset, offset + CARDS_PER_PAGE); return (
{/* Section header */}
Featured
{/* Navigation arrows */}
{ if (e.key === "ArrowLeft") { e.preventDefault(); goPrev(); setPaused(true); } if (e.key === "ArrowRight") { e.preventDefault(); goNext(); setPaused(true); } }} > {/* Position indicator */} {offset + 1}–{Math.min(offset + CARDS_PER_PAGE, rotatingStories?.length)}/{rotatingStories?.length}
{/* Hero Article — FIXED, only changes when manually updated */}
{hero?.category}

{hero?.title}

{hero?.excerpt}

Read More
{/* Secondary 2x2 Grid — rotating stories */}
setPaused(true)} onMouseLeave={() => setPaused(false)}> {visibleCards?.map((article, i) => (
{article?.category}

{article?.title}

Read More »
))}
{/* Dot indicators */}
{Array.from({ length: maxOffset + 1 })?.map((_, i) => (
); }