import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Textarea } from '@/components/ui/textarea'; import { Switch } from '@/components/ui/switch'; import { TONE_LEVELS, type ToneLevel } from '@/lib/openai'; import type { GeneratorType, GeneratorContext, GenerationConfig } from './hooks/useAiGeneration'; // ============================================================================= // Types // ============================================================================= interface GenerationFormProps { type: GeneratorType; context?: GeneratorContext; config: GenerationConfig; onCountChange: (count: number) => void; onToneChange: (tone: ToneLevel) => void; onCrudeLangChange: (crudeLang: boolean) => void; onInspirationChange: (inspiration: string) => void; } // ============================================================================= // Component // ============================================================================= export function GenerationForm({ type, context, config, onCountChange, onToneChange, onCrudeLangChange, onInspirationChange, }: GenerationFormProps) { const isExplicit = config.tone >= 4; return (
{TONE_LEVELS.find(t => t.level === config.tone)?.description}