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 (
{/* Question Count (questions only) */} {type === 'questions' && (
onCountChange(parseInt(e.target.value) || 10)} className="w-32" />
)} {/* Intimacy Level Selector (questions only) */} {type === 'questions' && (
{TONE_LEVELS.map((t) => ( ))}

{TONE_LEVELS.find(t => t.level === config.tone)?.description}

)} {/* Wild/Explicit Toggle (for other generators) */} {(type === 'category-ideas' || type === 'category-pack-ideas' || type === 'pack') && (
onToneChange(checked ? 5 : 3)} />
)} {/* Crude Language Override Toggle */}
(use "fuck", "suck cock" etc. instead of tasteful phrasing)
{/* Inspiration/Suggestions Textarea */}