'use client'; import * as React from 'react'; import { FormState } from '../types'; import { Checkbox } from '../components/Checkbox'; import { RepeatableList } from '../components/RepeatableList'; import { motion, AnimatePresence } from 'framer-motion'; import { Minus, Plus, Cpu, ListPlus } from 'lucide-react'; import { Reveal } from '../../Reveal'; interface FunctionsStepProps { state: FormState; updateState: (updates: Partial) => void; toggleItem: (list: string[], id: string) => string[]; } export function FunctionsStep({ state, updateState, toggleItem }: FunctionsStepProps) { const isWebApp = state.projectType === 'web-app'; const toggleDontKnow = (id: string) => { const current = state.dontKnows || []; if (current.includes(id)) { updateState({ dontKnows: current.filter(i => i !== id) }); } else { updateState({ dontKnows: [...current, id] }); } }; return (

{isWebApp ? 'Funktionale Anforderungen' : 'Erweiterte Funktionen'}

toggleDontKnow('functions')} className={`px-6 py-3 rounded-full text-sm font-bold transition-all whitespace-nowrap shrink-0 ${ state.dontKnows?.includes('functions') ? 'bg-slate-900 text-white' : 'bg-slate-100 text-slate-500 hover:bg-slate-200' }`} > Ich weiß es nicht
{isWebApp ? ( <> updateState({ functions: toggleItem(state.functions, 'dashboard') })} /> updateState({ functions: toggleItem(state.functions, 'files') })} /> updateState({ functions: toggleItem(state.functions, 'notifications') })} /> updateState({ functions: toggleItem(state.functions, 'export') })} /> ) : ( <> updateState({ functions: toggleItem(state.functions, 'search') })} /> updateState({ functions: toggleItem(state.functions, 'filter') })} /> updateState({ functions: toggleItem(state.functions, 'pdf') })} /> updateState({ functions: toggleItem(state.functions, 'forms') })} /> updateState({ functions: toggleItem(state.functions, 'members') })} /> updateState({ functions: toggleItem(state.functions, 'calendar') })} /> updateState({ functions: toggleItem(state.functions, 'chat') })} /> )}

Weitere spezifische Wünsche?

updateState({ otherFunctions: [...state.otherFunctions, v] })} onRemove={(i) => updateState({ otherFunctions: state.otherFunctions.filter((_, idx) => idx !== i) })} placeholder={isWebApp ? "z.B. Echtzeit-Chat, KI-Anbindung, Offline-Modus..." : "z.B. Mitgliederbereich, Event-Kalender, geschützte Downloads..."} />
); }