1import{u as y,r as h,j as e,B as b,t as u}from"./index-BY0Ct7ka.js";import{o as v,s as t,l as N,u as w,e as g,F as E,a as n,b as o,c as l,d as i,I as c,f as m,T as F,t as S}from"./form-g0fH4HmA.js";import{T as M,a as T,F as k}from"./Footer-BQwqt1Ig.js";import{P as B,a as I}from"./about-hero-bg-DQGHhVAm.js";import{M as P}from"./mail-Cwx7C2lJ.js";const q=v({name:t().trim().min(1,{message:"Name is required"}).max(100,{message:"Name must be less than 100 characters"}),email:t().trim().email({message:"Invalid email address"}).max(255,{message:"Email must be less than 255 characters"}),phone:t().max(20,{message:"Phone must be less than 20 characters"}).optional().or(N("")),message:t().trim().min(1,{message:"Message is required"}).max(5e3,{message:"Message must be less than 5000 characters"})}),L=()=>{const{t:s}=y(),[d,x]=h.useState(!1),r=w({resolver:S(q),defaultValues:{name:"",email:"",phone:"",message:""}});h.useEffect(()=>{g.init("vv-A51NACksCgrrea")},[]);const j=async a=>{x(!0);try{await g.send("service_coe9dq3","template_9vnh9jv",{from_name:a.name,from_email:a.email,phone:a.phone||"",message:a.message}),u({title:s("è¨æ¯å·²ç¼éï¼","Message sent!"),description:s("æåæç¡å¿«åè¦ä½ ã","We will get back to you soon.")}),r.reset()}catch(f){console.error("EmailJS error:",f),u({title:s("ç¼é失æ","Failed to send"),description:s("è«ç¨å¾å試ã","Please try again later."),variant:"destructive"})}finally{x(!1)}},p=[{label:s("é¦é ","Home"),href:"/"},{label:s("æåé
ç®","Services"),href:"/services"},{label:s("ãçåãé»éµæå","Befriending Email")}];return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsx(M,{}),e.jsx(T,{}),e.jsxs("main",{id:"main-content",className:"flex-1",children:[e.jsx(B,{title:s("ãçåãé»éµæå","Befriending Email"),backgroundImage:I,breadcrumbs:p}),e.jsx("section",{className:"py-12 md:py-16 lg:py-20",children:e.jsxs("div",{className:"container max-w-4xl",children:[e.jsx("div",{className:"flex justify-center mb-8",children:e.jsx("div",{className:"w-20 h-20 rounded-full bg-primary/10 flex items-center justify-center",children:e.jsx(P,{className:"w-10 h-10 text-primary"})})}),e.jsxs("div",{className:"prose prose-lg max-w-none space-y-6 text-center",children:[e.jsx("p",{className:"text-lg text-foreground/90 leading-relaxed",children:s("å¦æä½ ä¸æ³ééé»è©±å¾è«ï¼ææèçå°æ¹ä¸æ¹ä¾¿è´é»ï¼ä½ å¯è½åå
¶ä»æå使ç¨è
䏿¨£ï¼é¸æç¨æå表éä½ çæåã","If you prefer not to call or if there is no quiet place to talk, there is another way to contact The Samaritans. You may prefer to write down how you are feeling and contact us via our befriending email.")}),e.jsx("p",{className:"text-lg text-foreground/90 leading-relaxed",children:s("æçªå©äºæçãçåé»éµãæåééä¿å¯çé»åéµä»¶æä¾æ
ç·æ¯æ´ãè¥ä½ ä¸å¸æä½¿ç¨ç實å§åï¼å¯ä»¥æ¡ç¨ååæçåä¾å½ãæåæç¡åå¨äºååå°æä¹å
§åè¦ä½ çé»éµã","We provide emotional support via email. You don't have to give your name if you don't want to. Emailers may use a pseudonym or pen name. We try our best to get back to you within 24 hours.")}),e.jsxs("p",{className:"text-lg text-foreground/90 leading-relaxed",children:[s("é»éµå°åï¼","Email: "),e.jsx("a",{href:"mailto:[email protected]",className:"text-primary hover:underline font-medium",children:"[email protected]"})]})]}),e.jsx("div",{className:"mt-16 pt-12 border-t border-border",children:e.jsx(E,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit(j),className:"space-y-6 max-w-xl mx-auto",children:[e.jsx(n,{control:r.control,name:"name",render:({field:a})=>e.jsxs(o,{children:[e.jsxs(l,{children:[s("å§å","Name")," *"]}),e.jsx(i,{children:e.jsx(c,{placeholder:s("è«è¼¸å
¥ä½ çå§å","Enter your name"),...a})}),e.jsx(m,{})]})}),e.jsx(n,{control:r.control,name:"email",render:({field:a})=>e.jsxs(o,{children:[e.jsxs(l,{children:[s("é»éµå°å","Email")," *"]}),e.jsx(i,{children:e.jsx(c,{type:"email",placeholder:s("è«è¼¸å
¥ä½ çé»éµå°å","Enter your email"),...a})}),e.jsx(m,{})]})}),e.jsx(n,{control:r.control,name:"phone",render:({field:a})=>e.jsxs(o,{children:[e.jsx(l,{children:s("é»è©±è碼ï¼é¸å¡«ï¼","Phone (optional)")}),e.jsx(i,{children:e.jsx(c,{type:"tel",placeholder:s("è«è¼¸å
¥ä½ çé»è©±è碼","Enter your phone number"),...a})}),e.jsx(m,{})]})}),e.jsx(n,{control:r.control,name:"message",render:({field:a})=>e.jsxs(o,{children:[e.jsxs(l,{children:[s("è¨æ¯","Message")," *"]}),e.jsx(i,{children:e.jsx(F,{placeholder:s("è«è¼¸å
¥ä½ çè¨æ¯","Enter your message"),rows:6,...a})}),e.jsx(m,{})]})}),e.jsx(b,{type:"submit",className:"w-full",disabled:d,children:d?s("ç¼éä¸...","Sending..."):s("ç¼éè¨æ¯","Send Message")})]})})})]})})]}),e.jsx(k,{})]})};export{L 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.