'use client'; import * as React from 'react'; import { motion, useScroll, useTransform } from 'framer-motion'; import { Building2, Compass, Layers, ArrowDownToLine, Wrench, Factory, Zap, MapPin, CheckCircle2 } from 'lucide-react'; const iconMap: Record = { Building2, Compass, Layers, ArrowDownToLine, Wrench, Factory, Zap, MapPin, CheckCircle2 }; const defaultMilestones = [ { date: '16.12.2015', year: '2015', title: 'Gründung E-TIB GmbH', desc: 'Ausführung elektrischer Infrastrukturprojekte, Kabeltiefbau und Horizontalspülbohrungen.', iconName: 'Building2', }, { date: '04.02.2019', year: '2019', title: 'Gründung E-TIB Ingenieurgesellschaft', desc: 'Genehmigungs- und Ausführungsplanung, komplexe Querungen sowie Netzanschlussplanung.', iconName: 'Compass', }, { date: '14.11.2019', year: '2019', title: 'Gründung E-TIB Verwaltung GmbH', desc: 'Zentrale Dienste, Erwerb, Vermietung, Verpachtung und Verwaltung von Immobilien und Maschinen.', iconName: 'Layers', }, { date: '21.10.2025', year: '2025', title: 'Gründung E-TIB Bohrtechnik GmbH', desc: 'Spezialisierung auf präzise Horizontalspülbohrungen in allen Bodenklassen.', iconName: 'ArrowDownToLine', }, ]; interface Milestone { date: string; year: string; title: string; desc: string; iconName: string; } interface CompanyTimelineProps { badge?: string; title?: string; milestones?: Milestone[]; } export function CompanyTimeline({ badge = 'Unsere Geschichte', title = 'Meilensteine der Entwicklung', milestones = defaultMilestones }: CompanyTimelineProps) { const containerRef = React.useRef(null); const { scrollYProgress } = useScroll({ target: containerRef, offset: ["start center", "end center"] }); const lineHeight = useTransform(scrollYProgress, [0, 1], ["0%", "100%"]); return (
{/* Background Decor */}
{badge}

{title}

{/* Central Line Background */}
{/* Animated Central Line */}
{milestones.map((milestone, i) => { const isEven = i % 2 === 0; const Icon = iconMap[milestone.iconName] || Building2; return ( {/* Timeline Dot with Pulse */}
{/* Content Box Wrapper */}
{/* The Card */}
{/* Giant Typography Background Year */}
{milestone.year}
{/* Header Row */}
{milestone.date}

{milestone.title}

{milestone.desc}

); })}
); }