'use client'; import { useState } from 'react'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; import type { Behandelstructuur } from '@/lib/types/behandelplan'; interface BehandelstructuurFormProps { initialData?: Behandelstructuur | null; onChange: (data: Behandelstructuur) => void; } const DUUR_OPTIONS = ['4 weken', '6 weken', '8 weken', '10 weken', '12 weken', '16 weken', '24 weken']; const FREQUENTIE_OPTIONS = ['Wekelijks', 'Tweewekelijks', 'Maandelijks', '2x per week']; const VORM_OPTIONS = ['Individueel', 'Groep', 'Gezin', 'Paar', 'Online', 'Hybride']; export function BehandelstructuurForm({ initialData, onChange }: BehandelstructuurFormProps) { const [data, setData] = useState( initialData || { duur: '8 weken', frequentie: 'Wekelijks', aantalSessies: 8, vorm: 'Individueel', } ); const handleChange = (field: keyof Behandelstructuur, value: string | number) => { const updated = { ...data, [field]: value }; setData(updated); onChange(updated); }; return (
handleChange('aantalSessies', parseInt(e.target.value) || 1)} />
); }