module.exports=[70951,a=>{"use strict";var b=a.i(87924),c=a.i(72131);a.s(["ContactForm",0,function(){let a=(0,c.useRef)(null),[d,e]=(0,c.useState)("idle");async function f(b){b.preventDefault(),e("loading");let c=new FormData(b.currentTarget);try{(await fetch("/api/contact",{method:"POST",body:c})).ok?(e("success"),a.current?.reset()):e("error")}catch{e("error")}}return"success"===d?(0,b.jsxs)("div",{className:"rounded-2xl bg-green-500/10 border border-green-500/20 p-8 text-center",children:[(0,b.jsx)("p",{className:"text-lg font-semibold text-green-600",children:"Message Sent!"}),(0,b.jsx)("p",{className:"mt-2 text-sm text-foreground/60",children:"Thank you for reaching out. We will get back to you shortly."}),(0,b.jsx)("button",{onClick:()=>e("idle"),className:"mt-4 text-sm text-primary font-semibold hover:underline",children:"Send another message"})]}):(0,b.jsxs)("form",{ref:a,onSubmit:f,className:"space-y-6",children:[(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{htmlFor:"contact-name",className:"block text-sm font-semibold text-foreground mb-2",children:"Full Name *"}),(0,b.jsx)("input",{id:"contact-name",name:"name",type:"text",required:!0,className:"w-full rounded-xl border border-border bg-background px-4 py-3 text-foreground placeholder:text-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"Your name"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{htmlFor:"contact-email",className:"block text-sm font-semibold text-foreground mb-2",children:"Email *"}),(0,b.jsx)("input",{id:"contact-email",name:"email",type:"email",required:!0,className:"w-full rounded-xl border border-border bg-background px-4 py-3 text-foreground placeholder:text-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"your@email.com"})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{htmlFor:"contact-subject",className:"block text-sm font-semibold text-foreground mb-2",children:"Subject"}),(0,b.jsx)("input",{id:"contact-subject",name:"subject",type:"text",className:"w-full rounded-xl border border-border bg-background px-4 py-3 text-foreground placeholder:text-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"How can we help?"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{htmlFor:"contact-content",className:"block text-sm font-semibold text-foreground mb-2",children:"Message *"}),(0,b.jsx)("textarea",{id:"contact-content",name:"content",rows:6,required:!0,className:"w-full rounded-xl border border-border bg-background px-4 py-3 text-foreground placeholder:text-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/50 resize-none",placeholder:"Write your message here..."})]}),"error"===d&&(0,b.jsx)("p",{className:"text-sm text-red-500",children:"Something went wrong. Please try again."}),(0,b.jsx)("button",{type:"submit",disabled:"loading"===d,className:"w-full rounded-xl bg-primary px-6 py-3.5 text-sm font-semibold text-white shadow-lg transition-all hover:bg-primary/90 hover:shadow-xl disabled:opacity-50",children:"loading"===d?"Sending...":"Send Message"})]})}])}];

//# sourceMappingURL=components_ui_ContactForm_tsx_0103c7x._.js.map