import React from 'react'; import type { InputData } from '../types'; import { LANGUAGE_OPTIONS, CHANNEL_OPTIONS, translations } from '../constants'; import { LoadingSpinner, SparklesIcon } from './Icons'; interface InputFormProps { inputData: InputData; setInputData: React.Dispatch>; onGenerate: () => void; isLoading: boolean; t: typeof translations.de; } export const InputForm: React.FC = ({ inputData, setInputData, onGenerate, isLoading, t }) => { const handleInputChange = (e: React.ChangeEvent) => { const { name, value } = e.target; setInputData(prev => ({ ...prev, [name]: value })); }; const handleChannelChange = (channel: string) => { setInputData(prev => { const newChannels = prev.channels.includes(channel) ? prev.channels.filter(c => c !== channel) : [...prev.channels, channel]; return { ...prev, channels: newChannels }; }); }; return (
{ e.preventDefault(); onGenerate(); }} className="space-y-6">
{CHANNEL_OPTIONS.map(channel => ( ))}
); };