(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65254,e=>{"use strict";var a=e.i(43476),r=e.i(71645),s=e.i(18566);let t=(0,e.i(75254).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var l=e.i(95468),i=e.i(63209),o=e.i(31278);let n=[{value:"",label:"Select a topic..."},{value:"AI Control Architecture - Architecture Review",label:"AI Control Architecture - Architecture Review"},{value:"AI Control Architecture - New Implementation",label:"AI Control Architecture - New Implementation"},{value:"Kirtonic Orchestration Workflows",label:"Kirtonic Orchestration Workflows"},{value:"Kirtonic AI Workspaces",label:"Kirtonic AI Workspaces"},{value:"Kirtonic Platform",label:"Kirtonic Platform"},{value:"Enterprise Pricing",label:"Enterprise Pricing"},{value:"General Inquiry",label:"General Inquiry"}];function d(){let e=(0,s.useSearchParams)().get("subject")||"",[d,c]=(0,r.useState)({name:"",email:"",subject:"",message:""});(0,r.useEffect)(()=>{e&&c(a=>({...a,subject:e}))},[e]);let[m,u]=(0,r.useState)("idle"),[b,x]=(0,r.useState)(""),p=async e=>{e.preventDefault(),u("loading"),x("");try{let e=await fetch("https://s77ux4qsml.execute-api.us-east-1.amazonaws.com/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.name,email:d.email,message:d.subject?`Subject: ${d.subject} ${d.message}`:d.message})}),a=await e.json();if(!e.ok)throw Error(a.error||"Failed to send message");u("success"),c({name:"",email:"",subject:"",message:""}),setTimeout(()=>u("idle"),5e3)}catch(e){console.error("Error sending message:",e),u("error"),x(e instanceof Error?e.message:"Something went wrong. Please try again.")}},g=e=>{c(a=>({...a,[e.target.name]:e.target.value}))};return(0,a.jsxs)("form",{onSubmit:p,className:"space-y-6","aria-label":"Contact form",children:[(0,a.jsx)("input",{type:"text",name:"company",tabIndex:-1,autoComplete:"off",className:"hidden","aria-hidden":"true",onChange:()=>{}}),"success"===m&&(0,a.jsxs)("div",{className:"p-4 rounded-xl bg-green-500/10 border border-green-500/30 flex items-start gap-3",children:[(0,a.jsx)(l.CheckCircle2,{className:"w-5 h-5 text-green-500 flex-shrink-0 mt-0.5"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-green-500",children:"Message sent successfully!"}),(0,a.jsx)("p",{className:"text-sm text-green-500/80 mt-1",children:"We'll get back to you within 24 hours."})]})]}),"error"===m&&(0,a.jsxs)("div",{className:"p-4 rounded-xl bg-red-500/10 border border-red-500/30 flex items-start gap-3",children:[(0,a.jsx)(i.AlertCircle,{className:"w-5 h-5 text-red-500 flex-shrink-0 mt-0.5"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-red-500",children:"Failed to send message"}),(0,a.jsx)("p",{className:"text-sm text-red-500/80 mt-1",children:b||"Please try again or email us directly at ...@kirtonic.io"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"name",className:"block text-sm font-medium mb-2",children:["Name ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{id:"name",name:"name",type:"text",required:!0,value:d.name,onChange:g,disabled:"loading"===m,autoComplete:"name",placeholder:"Your name",className:"w-full rounded-xl border border-[var(--border)] bg-[var(--card)] px-4 py-3 text-sm focus:border-[var(--primary)] focus:ring-2 focus:ring-[var(--primary)]/20 outline-none transition-all disabled:opacity-50 disabled:cursor-not-allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"email",className:"block text-sm font-medium mb-2",children:["Email ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{id:"email",name:"email",type:"email",required:!0,value:d.email,onChange:g,disabled:"loading"===m,autoComplete:"email",placeholder:"you@example.com",className:"w-full rounded-xl border border-[var(--border)] bg-[var(--card)] px-4 py-3 text-sm focus:border-[var(--primary)] focus:ring-2 focus:ring-[var(--primary)]/20 outline-none transition-all disabled:opacity-50 disabled:cursor-not-allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"subject",className:"block text-sm font-medium mb-2",children:["Subject ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("select",{id:"subject",name:"subject",required:!0,value:d.subject,onChange:g,disabled:"loading"===m,className:"w-full rounded-xl border border-[var(--border)] bg-[var(--card)] px-4 py-3 text-sm focus:border-[var(--primary)] focus:ring-2 focus:ring-[var(--primary)]/20 outline-none transition-all disabled:opacity-50 disabled:cursor-not-allowed appearance-none cursor-pointer",style:{backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 1rem center",backgroundSize:"1rem"},children:n.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{htmlFor:"message",className:"block text-sm font-medium mb-2",children:["Message ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("textarea",{id:"message",name:"message",rows:6,required:!0,value:d.message,onChange:g,disabled:"loading"===m,placeholder:"Tell us about your use case...",className:"w-full rounded-xl border border-[var(--border)] bg-[var(--card)] px-4 py-3 text-sm focus:border-[var(--primary)] focus:ring-2 focus:ring-[var(--primary)]/20 outline-none transition-all resize-none disabled:opacity-50 disabled:cursor-not-allowed"})]}),(0,a.jsx)("button",{type:"submit",disabled:"loading"===m,className:"w-full px-6 py-3 rounded-xl bg-[var(--primary)] text-white font-medium hover:opacity-90 transition-all shadow-lg hover:shadow-xl disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:"loading"===m?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Loader2,{className:"w-4 h-4 animate-spin"}),"Sending..."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t,{className:"w-4 h-4"}),"Send Message"]})}),(0,a.jsxs)("p",{className:"text-xs text-[var(--muted-foreground)]",children:["By submitting this form, you agree to our"," ",(0,a.jsx)("a",{href:"/legal/privacy",className:"underline hover:text-[var(--primary)]",children:"Privacy Policy"}),"."]})]})}e.s(["default",()=>d],65254)}]);