import { useRef } from "react"; import { motion, useInView } from "framer-motion"; import { useForm } from "react-hook-form"; import { zodResolver } from "@hookform/resolvers/zod"; import * as z from "zod"; import { Mail, User, MessageSquare, Leaf } from "lucide-react"; import { Button } from "./ui/button"; import { Input } from "./ui/input"; import { Textarea } from "./ui/textarea"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select"; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "./ui/form"; import { useToast } from "./ui/use-toast"; const formSchema = z.object({ name: z.string().min(2, "Name must be at least 2 characters"), email: z.string().email("Please enter a valid email address"), produceType: z.string().min(1, "Please select a produce type"), message: z.string().min(10, "Message must be at least 10 characters"), }); type FormValues = z.infer; const produceTypes = [ "Leafy Vegetables", "Root Vegetables", "Berries", "Citrus Fruits", "Tropical Fruits", "Stone Fruits", "Other", ]; export default function ContactSection() { const ref = useRef(null); const isInView = useInView(ref, { once: true, margin: "-100px" }); const { toast } = useToast(); const form = useForm({ resolver: zodResolver(formSchema), defaultValues: { name: "", email: "", produceType: "", message: "", }, }); const onSubmit = (data: FormValues) => { console.log("Form submitted:", data); toast({ title: "Message Sent!", description: "Thank you for contacting us. We'll get back to you soon.", }); form.reset(); }; return (

Get In Touch

Have a questions? Let's connect!

{/* Contact Form */}
( Full Name
)} /> ( Email Address
)} /> ( Produce Type )} /> ( Message