/** Source code string shown in the Storybook Docs tab for the WithFormIntegration story */ declare const withFormIntegrationSource = "\nimport { Field, FieldLabel, FieldDescription, FieldControl, Form, Input, Button, Switch, ErrorMessage, Box, useZodForm } from '@jtl-software/platform-ui-react';\nimport { z } from 'zod';\n\nconst loginSchema = z.object({\n email: z.string().email({ message: 'Please enter a valid email address' }),\n password: z.string().min(8, { message: 'Password must be at least 8 characters' }),\n enableNotifications: z.boolean().refine(val => val, {\n message: 'Please enable notifications',\n }),\n});\n\n// FieldLabel auto-gets htmlFor from context.\n// FieldControl auto-injects id + RHF props into the wrapped control.\n// ErrorMessage is auto-appended when validation fails.\n// All sub-components work at any nesting depth via React context.\nconst LoginForm = () => {\n const form = useZodForm({ schema: loginSchema, defaultValues: { email: '', password: '', enableNotifications: false } });\n\n return (\n
\n \n Email Address\n \n \n \n Enter your registered email\n \n\n \n Password\n \n \n \n Must be at least 8 characters\n \n\n (\n \n \n \n Enable notifications\n Get updates via email\n \n \n \n \n \n {fieldState?.error?.message && }\n \n )}\n />\n\n