import React from 'react'; import { Navigate } from 'react-router-dom'; import { ArrowRight, CheckCircle2, Layers, ListChecks, Menu, Moon, Palette, QrCode, ShieldCheck, Smartphone, Sparkles, Sun, Wand2, } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import { Button } from '@/components/ui/button'; import { Badge } from '@/components/ui/badge'; import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from '@/components/ui/sheet'; import { cn } from '@/lib/utils'; import { useAppearance } from '@/hooks/use-appearance'; import { ADMIN_DEFAULT_AFTER_LOGIN_PATH, ADMIN_LOGIN_PATH } from '../constants'; import { useAuth } from '../auth/context'; import { LanguageSwitcher } from '../components/LanguageSwitcher'; import { navigateToHref } from '../lib/navigation'; import { getCurrentLocale } from '../lib/locale'; type Feature = { key: string; title: string; description: string; icon: React.ComponentType>; }; type Step = { key: string; title: string; description: string; accent: string; }; type Plan = { key: string; title: string; badge?: string; highlight?: string; points: string[]; }; export default function WelcomeTeaserPage() { const { t } = useTranslation('common'); const { status } = useAuth(); const { appearance, updateAppearance } = useAppearance(); const [isMenuOpen, setIsMenuOpen] = React.useState(false); React.useEffect(() => { document.body.classList.add('tenant-admin-theme', 'tenant-admin-welcome-theme'); return () => { document.body.classList.remove('tenant-admin-theme', 'tenant-admin-welcome-theme'); }; }, []); if (status === 'authenticated') { return ; } const locale = getCurrentLocale(); const packagesHref = `/${locale}/packages`; const howItWorksHref = locale === 'de' ? `/${locale}/so-funktionierts` : `/${locale}/how-it-works`; const features: Feature[] = [ { key: 'branding', title: t('welcome.features.branding.title', 'Branding & Layout'), description: t('welcome.features.branding.description', 'Farben, Schriften, QR-Layouts und Einladungen in einem Fluss.'), icon: Palette, }, { key: 'tasks', title: t('welcome.features.tasks.title', 'Aufgaben & Emotion-Sets'), description: t('welcome.features.tasks.description', 'Sammlungen importieren oder eigene Aufgaben erstellen – mobil abhakbar.'), icon: ListChecks, }, { key: 'moderation', title: t('welcome.features.moderation.title', 'Foto-Moderation'), description: t('welcome.features.moderation.description', 'Uploads sofort prüfen, Highlights markieren und Galerie-Link teilen.'), icon: ShieldCheck, }, { key: 'invites', title: t('welcome.features.invites.title', 'Einladungen & QR'), description: t('welcome.features.invites.description', 'Links und Druckvorlagen generieren – mit Paketlimits im Blick.'), icon: QrCode, }, ]; const steps: Step[] = [ { key: 'prepare', title: t('welcome.steps.prepare.title', 'Vorbereiten'), description: t('welcome.steps.prepare.description', 'Event anlegen, Branding setzen, Aufgaben aktivieren.'), accent: t('welcome.steps.prepare.accent', 'Setup'), }, { key: 'share', title: t('welcome.steps.share.title', 'Teilen & Einladen'), description: t('welcome.steps.share.description', 'QRs/Links verteilen, Missionen auswählen, Team onboarden.'), accent: t('welcome.steps.share.accent', 'Share'), }, { key: 'run', title: t('welcome.steps.run.title', 'Live moderieren'), description: t('welcome.steps.run.description', 'Uploads prüfen, Highlights pushen und nach dem Event die Galerie teilen.'), accent: t('welcome.steps.run.accent', 'Live'), }, ]; const plans: Plan[] = [ { key: 'starter', title: t('welcome.plans.starter.title', 'Starter'), badge: t('welcome.plans.starter.badge', 'Für ein Event'), points: [ t('welcome.plans.starter.p1', '1 Event, Basis-Branding'), t('welcome.plans.starter.p2', 'Aufgaben & Einladungen inklusive'), t('welcome.plans.starter.p3', 'Moderation & Galerie-Link'), ], }, { key: 'standard', title: t('welcome.plans.standard.title', 'Standard'), badge: t('welcome.plans.standard.badge', 'Beliebt'), highlight: t('welcome.plans.standard.highlight', 'Mehr Kontingent & Branding'), points: [ t('welcome.plans.standard.p1', 'Mehr Events pro Jahr'), t('welcome.plans.standard.p2', 'Erweitertes Branding & Layouts'), t('welcome.plans.standard.p3', 'Support bei Live-Events'), ], }, { key: 'reseller', title: t('welcome.plans.reseller.title', 'Reseller S'), badge: t('welcome.plans.reseller.badge', 'Für Dienstleister'), highlight: t('welcome.plans.reseller.highlight', 'Mehrere Events parallel verwalten'), points: [ t('welcome.plans.reseller.p1', 'Bis zu 5 Events pro Paket'), t('welcome.plans.reseller.p2', 'Aufgaben-Sammlungen und Vorlagen'), t('welcome.plans.reseller.p3', 'Teamrollen & Rechteverwaltung'), ], }, ]; const audienceCards = [ { key: 'endcustomers', title: t('welcome.audience.endcustomers.title', 'Endkund:innen'), description: t('welcome.audience.endcustomers.description', 'Schnell einrichten, mobil moderieren und nach dem Event die Galerie teilen.'), icon: Smartphone, }, { key: 'resellers', title: t('welcome.audience.resellers.title', 'Reseller & Agenturen'), description: t('welcome.audience.resellers.description', 'Mehrere Events im Blick behalten, Kontingente überwachen und Vorlagen nutzen.'), icon: Layers, }, ]; const previewRaw = t('welcome.preview.items', { defaultValue: [ 'Moderation, Aufgaben und Einladungen als Schnellzugriff', 'Sticky Actions auf Mobile für den Eventtag', 'Paket-Status & Limits jederzeit sichtbar', ], returnObjects: true, }); const previewBullets = Array.isArray(previewRaw) ? previewRaw : [String(previewRaw)]; const themeLabel = appearance === 'dark' ? t('welcome.theme.dark', 'Dunkel') : t('welcome.theme.light', 'Hell'); const handleLogin = React.useCallback(() => { navigateToHref(ADMIN_LOGIN_PATH); }, []); const handlePackages = React.useCallback(() => navigateToHref(packagesHref), [packagesHref]); const handleHow = React.useCallback(() => navigateToHref(howItWorksHref), [howItWorksHref]); const handleThemeToggle = React.useCallback(() => { updateAppearance(appearance === 'dark' ? 'light' : 'dark'); }, [appearance, updateAppearance]); const renderMenuActions = () => (

{t('welcome.theme.label', 'Darstellung')}

{themeLabel}

{t('app.languageSwitch')}
); return (
FS

{t('welcome.eyebrow', 'Event Admin')}

Fotospiel.app

{t('welcome.menu.title', 'Navigation')} {renderMenuActions()}
{t('welcome.badge', 'Fotos, Aufgaben & Einladungen an einem Ort')}
{t('welcome.loginPrompt', 'Bereits Kunde? Login oben rechts.')}

{t('welcome.title', 'Event-Branding, Aufgaben & Foto-Moderation in einer App.')}

{t('welcome.subtitle', 'Bereite dein Event vor, teile Einladungen, moderiere Uploads live und gib die Galerie danach frei.')}

{t('welcome.preview.title', 'Was dich erwartet')}
{previewBullets.map((item) => (

{item}

))}

{t('welcome.highlight.moderation', 'Live-Moderation')}

{t('welcome.highlight.moderationHint', 'Approve/Hide, Highlights, Galerie-Link')}

{t('welcome.highlight.tasks', 'Aufgaben & Emotion-Sets')}

{t('welcome.highlight.tasksHint', 'Sammlungen importieren oder eigene erstellen')}

{t('welcome.features.title', 'Was du steuern kannst')}

{t('welcome.features.subtitle', 'Alles an einem Ort')}

{features.map((feature) => (
{feature.title}

{feature.description}

))}

{t('welcome.steps.title', "So funktioniert's")}

{t('welcome.steps.subtitle', 'In drei Schritten bereit')}

{steps.map((step) => (
{step.accent}

{step.title}

{step.description}

))}

{t('welcome.plans.title', 'Pakete im Überblick')}

{t('welcome.plans.subtitle', 'Wähle das passende Kontingent')}

{t('welcome.plans.hint', 'Starter, Standard oder Reseller – alles mit Moderation & Einladungen.')}

{plans.map((plan) => (
{plan.badge ?? t('welcome.plans.badge', 'Paket')} {plan.highlight ? ( {plan.highlight} ) : null}
{plan.title}
    {plan.points.map((point) => (
  • {point}
  • ))}
))}

{t('welcome.audience.title', 'Für wen?')}

{t('welcome.audience.subtitle', 'Endkunden & Reseller im Blick')}

{audienceCards.map((audience) => (
{audience.title}

{audience.description}

{t('welcome.audience.cta', 'Wenige Klicks bis zum Start')}
))}

{t('welcome.footer.eyebrow', 'Bereit?')}

{t('welcome.footer.title', 'Melde dich an oder prüfe die Pakete')}

{t('welcome.footer.subtitle', 'Login für bestehende Kunden, Pakete für neue Teams.')}

); }