'use client' import { useState } from 'react' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import { FORM_TEMPLATES, type FormTemplate } from '@/lib/form-templates' import { FormBuilder } from './form-builder' // Template chooser shown first on /forms/new. Picking a template just seeds // builder state (no DB row until the builder saves). export function NewFormClient({ spaceSlug }: { spaceSlug: string }) { const [tpl, setTpl] = useState(null) if (tpl) { return (
) } return (

Start from a template or a blank form. You can change everything afterwards.

{FORM_TEMPLATES.map(t => ( ))}
) }