'use client' import { motion } from 'framer-motion' import { Language, PitchFunding } from '@/lib/types' import { t } from '@/lib/i18n' import ProjectionFooter from '../ui/ProjectionFooter' import GradientText from '../ui/GradientText' import FadeInView from '../ui/FadeInView' import AnimatedCounter from '../ui/AnimatedCounter' import GlassCard from '../ui/GlassCard' import { Landmark } from 'lucide-react' import { Target, Calendar, FileText } from 'lucide-react' import { PieChart, Pie, Cell, ResponsiveContainer, Tooltip } from 'recharts' interface TheAskSlideProps { lang: Language funding: PitchFunding } const COLORS = ['#6366f1', '#a78bfa', '#60a5fa', '#34d399', '#fbbf24'] function formatFundingAmount(amount: number): { target: number; suffix: string } { if (amount >= 1_000_000) { return { target: Math.round(amount / 100_000) / 10, suffix: ' Mio.' } } if (amount >= 1_000) { return { target: Math.round(amount / 1_000), suffix: 'k' } } return { target: amount, suffix: '' } } function formatTargetDate(dateStr: string, lang: Language): string { if (!dateStr) return 'TBD' try { const d = new Date(dateStr) const quarter = Math.ceil((d.getMonth() + 1) / 3) return `Q${quarter} ${d.getFullYear()}` } catch { return dateStr } } export default function TheAskSlide({ lang, funding }: TheAskSlideProps) { const i = t(lang) const de = lang === 'de' const rawFunds = funding?.use_of_funds const useOfFunds = Array.isArray(rawFunds) ? rawFunds : (typeof rawFunds === 'string' ? JSON.parse(rawFunds) : []) const amount = Number(funding?.amount_eur) || 0 const { target, suffix } = formatFundingAmount(amount) const pieData = useOfFunds.map((item: Record) => ({ name: (de ? item.label_de : item.label_en) as string || 'N/A', value: Number(item.percentage) || 0, })) return (

{i.theAsk.title}

{i.theAsk.subtitle}

{/* Main Number — dynamisch aus funding.amount_eur */}

EUR

{/* Details — dynamisch aus funding-Objekt */}

{i.theAsk.instrument}

{funding?.instrument || 'SAFE'}

{i.theAsk.targetDate}

{formatTargetDate(funding?.target_date, lang)}

{lang === 'de' ? 'Runde' : 'Round'}

{funding?.round_name || 'Pre-Seed'}

{/* Use of Funds */}

{i.theAsk.useOfFunds}

{/* Pie Chart */}
{pieData.map((_, idx) => ( ))} `${value}%`} />
{/* Legend */}
{useOfFunds.map((item, idx) => (
{lang === 'de' ? item.label_de : item.label_en} {item.percentage}% {((amount * item.percentage) / 100).toLocaleString('de-DE')} EUR
))}
{/* INVEST Program Hint */}

{de ? 'BAFA INVEST — Zuschuss für Wagniskapital' : 'BAFA INVEST — Venture Capital Grant'}

{de ? 'Investoren erhalten über das BAFA INVEST-Programm bis zu 15% steuerfreien Erwerbszuschuss auf ihr Investment (max. 50.000 EUR pro Einzelinvestment) sowie zusätzlich 25% Exit-Zuschuss auf Veräußerungsgewinne. Effektive Förderung: bis zu 40% (Entry + Exit kombiniert). Voraussetzung: natürliche Person, Mindesthaltedauer 3 Jahre.' : 'Investors receive up to 15% tax-free acquisition grant on their investment through the BAFA INVEST program (max. EUR 50,000 per single investment) plus an additional 25% exit grant on capital gains. Effective support: up to 40% (entry + exit combined). Requirements: natural person, 3-year minimum holding period.'}

{de ? '* Programm verlängert bis 31.12.2026. Aktuelle Konditionen auf bafa.de prüfen.' : '* Program extended until 31.12.2026. Verify current terms at bafa.de.'}

) }