'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, Banknote, ArrowRightLeft, TrendingUp, ShieldCheck, 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 isWandeldarlehen = (funding?.instrument || '').toLowerCase().includes('wandeldarlehen') 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 totalBudget = isWandeldarlehen ? amount * 2 : 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

{isWandeldarlehen && (
{/* Row 1: 200k Scenario */}

{de ? 'Ihr Investment' : 'Your Investment'}

40k EUR

{de ? 'ab 20% — auch mehr möglich' : 'from 20% — more possible'}

+

L-Bank Pre-Seed

160k EUR

=

{de ? 'Gesamtfinanzierung' : 'Total Funding'}

200k EUR

{/* Row 2: 400k Scenario (optional) */}

{de ? 'Ihr Investment' : 'Your Investment'}

80k EUR

+

L-Bank Pre-Seed

320k EUR

=

{de ? 'Gesamtfinanzierung' : 'Total Funding'}

400k EUR

{de ? 'Optional: doppelte Tranche bei höherem Investor-Anteil' : 'Optional: double tranche with higher investor share'}

)}
{/* 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'}

{/* Wandeldarlehen Explanation — only shown for Wandeldarlehen versions */} {isWandeldarlehen && ( <> {/* How it works */}

{de ? 'So funktioniert das Wandeldarlehen' : 'How the Convertible Loan Works'}

{de ? '1. Investition' : '1. Investment'}

{de ? 'Investor stellt Darlehen bereit — keine sofortige Bewertung, keine sofortige Verwässerung.' : 'Investor provides a loan — no immediate valuation, no immediate dilution.'}

{de ? '2. Conversion' : '2. Conversion'}

{de ? 'Bei der nächsten Finanzierungsrunde wandelt das Darlehen in Anteile — mit Discount für den Frühphasen-Investor.' : 'At the next funding round, the loan converts to equity — with a discount for the early-stage investor.'}

{de ? '3. Investor-Vorteil' : '3. Investor Advantage'}

{de ? 'Durch den Discount erhält der Investor mehr Anteile pro Euro als spätere Investoren — Prämie für frühes Vertrauen.' : 'The discount gives the investor more shares per euro than later investors — a premium for early trust.'}

{/* Pre-Seed BW / L-Bank */}

{de ? 'Pre-Seed BW — Staatliche Co-Finanzierung (L-Bank)' : 'Pre-Seed BW — Government Co-Financing (L-Bank)'}

{de ? 'Das Investment wird über das Pre-Seed-Programm von Start-up BW / L-Bank staatlich co-finanziert. Die L-Bank stellt eine Zuwendung mit Wandlungsvorbehalt bereit — das reduziert das Risiko für private Investoren und signalisiert staatliches Vertrauen in das Geschäftsmodell.' : 'The investment is co-financed through the Pre-Seed BW / L-Bank government program. L-Bank provides a grant with conversion option — reducing risk for private investors and signaling government confidence in the business model.'}

)} {/* 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}% {((totalBudget * item.percentage) / 100).toLocaleString('de-DE')} EUR
))}
{/* INVEST Program Hint */}

{de ? 'BAFA INVEST — Zuschuss für Wagniskapital (Kombinierbarkeit mit L-Bank Wandeldarlehen muss geprüft werden)' : 'BAFA INVEST — Venture Capital Grant (Compatibility with L-Bank convertible loan must be verified)'}

{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.'}

) }