/** 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    <Form form={form} onSubmit={console.log}>\n      <Field name=\"email\">\n        <FieldLabel required>Email Address</FieldLabel>\n        <FieldControl>\n          <Input type=\"email\" placeholder=\"you@example.com\" />\n        </FieldControl>\n        <FieldDescription>Enter your registered email</FieldDescription>\n      </Field>\n\n      <Field name=\"password\">\n        <FieldLabel required>Password</FieldLabel>\n        <FieldControl>\n          <Input type=\"password\" placeholder=\"Enter your password\" />\n        </FieldControl>\n        <FieldDescription>Must be at least 8 characters</FieldDescription>\n      </Field>\n\n      <Field\n        name=\"enableNotifications\"\n        render={({ field, fieldState }) => (\n          <Box className=\"flex flex-col\">\n            <Box className=\"flex flex-row gap-[var(--spacing-2)] justify-between\">\n              <Box className=\"flex flex-col gap-[var(--spacing-2)]\">\n                <FieldLabel>Enable notifications</FieldLabel>\n                <FieldDescription>Get updates via email</FieldDescription>\n              </Box>\n              <FieldControl>\n                <Switch {...field} />\n              </FieldControl>\n            </Box>\n            {fieldState?.error?.message && <ErrorMessage message={fieldState.error?.message} />}\n          </Box>\n        )}\n      />\n\n      <Button type=\"submit\" label=\"Sign In\" />\n    </Form>\n  );\n};\n";
export default withFormIntegrationSource;
