'use client' import { useState, useEffect, useRef, useCallback } from 'react' import { Language } from '@/lib/types' import GradientText from '../ui/GradientText' import FadeInView from '../ui/FadeInView' import { type Milestone } from './MilestonesSlide.data' import { THEMES, CSS_KF, useIsLight } from './MilestonesSlide.themes' import { MilestonesInner } from './MilestonesSlide.parts' interface MilestonesSlideProps { lang: Language } const INNER_W = 1280 const INNER_H = 600 export default function MilestonesSlide({ lang }: MilestonesSlideProps) { const de = lang === 'de' const isLight = useIsLight() const t = isLight ? THEMES.light : THEMES.dark const [sel, setSel] = useState(null) const [scale, setScale] = useState(1) const containerRef = useRef(null) const calcScale = useCallback(() => { if (containerRef.current) { const w = containerRef.current.offsetWidth setScale(Math.min(w / INNER_W, 1)) } }, []) useEffect(() => { calcScale() const obs = new ResizeObserver(calcScale) if (containerRef.current) obs.observe(containerRef.current) return () => obs.disconnect() }, [calcScale]) return (

{de ? 'Meilensteine' : 'Milestones'}

{de ? 'Von der Idee zur GmbH — was wir bereits erreicht haben' : 'From idea to GmbH — what we have already achieved'}

) }