'use client'; import * as React from 'react'; import { motion, Variants } from 'framer-motion'; import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay'; export interface ServicePanelData { id: string; title: string; icon: 'energy' | 'fiber' | 'hdd' | 'planning' | 'survey'; fullWidth?: boolean; lists: string[][]; } interface ServiceDetailGridProps { badge?: string; title?: string; descriptionParagraphs?: string[]; panels: ServicePanelData[]; } const containerVariants: Variants = { hidden: { opacity: 0 }, visible: { opacity: 1, transition: { staggerChildren: 0.1, }, }, }; const itemVariants: Variants = { hidden: { opacity: 0, y: 40 }, visible: { opacity: 1, y: 0, transition: { duration: 0.7, ease: [0.16, 1, 0.3, 1] } }, }; const Icons = { energy: ( ), fiber: ( ), hdd: ( ), planning: ( ), survey: ( ) }; export function ServiceDetailGrid({ badge, title, descriptionParagraphs, panels }: ServiceDetailGridProps) { return (
{/* Premium Background Ambience */}
{badge &&

{badge}

} {title && (

{title}

)}
{descriptionParagraphs?.map((p, i) => { // Quick parse for basic bolding const parts = p.split('**'); if (parts.length > 1) { return (

{parts.map((part, j) => j % 2 === 1 ? {part} : part)}

); } return

{p}

; })}
{panels.map((panel) => { const isFullWidth = panel.fullWidth; return ( {/* Subtle primary glow behind the card on hover */}

{panel.title}

{Icons[panel.icon]}
{panel.lists.map((list, listIdx) => (
    {list.map((item, itemIdx) => (
  • {item}
  • ))}
))}
); })}
); }