1import{j as e}from"./ui-CaSKR5b8.js";import{r as c}from"./vendor-Z_jdRBrZ.js";import{u,w as x,a as i,I as l,B as p,L as h,M as j,s as g}from"./index-CmZ8uvlD.js";import{T as f}from"./textarea-Ck7-wZUS.js";import{P as b}from"./PublicHeader-GlWVeybE.js";import{A as N}from"./AppFooter-B_gX_4xi.js";import{M as v}from"./MetaTags-ZVUaV-V2.js";import{S as w}from"./send-D9z2Pl-q.js";import"./supabase-C8NW8esT.js";import"./charts-C-qvfZhm.js";import"./arrow-left-DFt4iX0v.js";import"./menu-CM0-tBcK.js";import"./dateUtils-BUPKMAh4.js";const E=()=>{const{toast:m}=u(),[o,n]=c.useState(!1),[s,t]=c.useState({name:"",email:"",subject:"",message:""}),d=async a=>{a.preventDefault(),n(!0);try{const{error:r}=await g.functions.invoke("support-contact",{body:s});if(r)throw r;m({title:"Message sent",description:"We'll get back to you within 24 hours."}),t({name:"",email:"",subject:"",message:""})}catch(r){m({title:"Something went wrong",description:r.message||"Failed to send message",variant:"destructive"})}finally{n(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(v,{title:"Support | XALON",description:"Get help with XALON. Our team responds within 24 hours.",canonical:"https://xalon.ai/support",ogUrl:"https://xalon.ai/support"}),e.jsxs("div",{className:"bg-background flex flex-col",children:[e.jsx(b,{showBackButton:!0,backPath:"/"}),e.jsx("main",{className:"flex-1 py-16 sm:py-24 px-4",children:e.jsxs("div",{className:"mx-auto max-w-lg",children:[e.jsxs("div",{className:"text-center mb-12",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-primary/10 mb-4",children:e.jsx(x,{className:"w-6 h-6 text-primary"})}),e.jsx("h1",{className:"text-2xl sm:text-3xl font-semibold text-foreground",children:"Get in touch"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:"We'll respond within 24 hours"})]}),e.jsxs("form",{onSubmit:d,className:"space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"name",className:"text-sm font-medium",children:"Name"}),e.jsx(l,{id:"name",value:s.name,onChange:a=>t({...s,name:a.target.value}),placeholder:"Your name",required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"email",className:"text-sm font-medium",children:"Email"}),e.jsx(l,{id:"email",type:"email",value:s.email,onChange:a=>t({...s,email:a.target.value}),placeholder:"[email protected]",required:!0})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"subject",className:"text-sm font-medium",children:"Subject"}),e.jsx(l,{id:"subject",value:s.subject,onChange:a=>t({...s,subject:a.target.value}),placeholder:"How can we help?",required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"message",className:"text-sm font-medium",children:"Message"}),e.jsx(f,{id:"message",value:s.message,onChange:a=>t({...s,message:a.target.value}),placeholder:"Tell us more about your question or issue...",rows:5,required:!0})]}),e.jsx(p,{type:"submit",className:"w-full",size:"lg",disabled:o,children:o?e.jsxs(e.Fragment,{children:[e.jsx(h,{className:"w-4 h-4 mr-2 animate-spin"}),"Sending..."]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"w-4 h-4 mr-2"}),"Send message"]})})]}),e.jsxs("div",{className:"mt-12 pt-8 border-t border-border text-center",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Prefer email?"}),e.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-2 text-sm text-primary hover:underline",children:[e.jsx(j,{className:"w-4 h-4"}),"[email protected]"]})]})]})}),e.jsx(N,{})]})]})};export{E as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.