import { P as e } from "../../../../packageName-CJwD6mUt.js";
const l = `
import {
  Form,
  Field,
  FieldLabel,
  FieldControl,
  useZodForm,
  SimpleInput,
  Button,
  Box,
  Text
} from '${e}';
import { z } from 'zod';

const loginFormSchema = z.object({
  email: z.string().email({ message: 'Please enter a valid email address' }),
  password: z.string().min(1, { message: 'Password is required' }),
});

const LoginForm: React.FC = () => {
  const form = useZodForm({
    schema: loginFormSchema,
    defaultValues: { email: '', password: '' },
  });

  const onSubmit = (data: z.infer<typeof loginFormSchema>) => {
    console.log(data);
  };

  return (
    <Form form={form} onSubmit={onSubmit}>
      <Box className="flex flex-col gap-4">
        <Field name="email">
          <FieldLabel required>Email</FieldLabel>
          <FieldControl>
            <SimpleInput type="email" placeholder="Enter your email" />
          </FieldControl>
        </Field>

        <Field name="password">
          <FieldLabel required>Password</FieldLabel>
          <FieldControl>
            <SimpleInput type="password" placeholder="Enter your password" />
          </FieldControl>
        </Field>

        <Button variant="default" type="submit" label="Login" />
      </Box>
    </Form>
  );
};
`;
export {
  l as default
};
//# sourceMappingURL=loginFormSource.js.map
