1import{_ as y}from"./B2UnsJXf.js";import{I as w}from"./2Qq-omLE.js";import{B as S}from"./Bf1JrB5p.js";import{F as _,N as k}from"./Bto3la5R.js";import{a as d,d as D,i as P}from"./CS_J_7_a.js";import{e as V,f as F,m as E,_ as B,c as n,b as a,a as s,t as r,i as N,j as h,k as C,d as i,v as $,w as m,l as u,o as l}from"./BhMFTaRk.js";import"./BpNIR51K.js";const I=V({name:"ContactPage",components:{Input:w,Button:S,Navigation:k,Footer:_},setup(){return{localePath:E()}},data(){return{formData:{name:"",email:"",message:""},errors:{name:"",email:"",message:""},isSubmitting:!1,isSubmitted:!1,submitError:""}},head(){return{title:"Contact Us - Pawsitive Foster",meta:[{name:"description",content:"Get in touch with the Pawsitive Foster team. We'd love to hear from you."}]}},methods:{validateForm(){let e=!0;return this.errors={name:"",email:"",message:""},this.formData.name.trim().length<2&&(this.errors.name="Please enter your name",e=!1),P(this.formData.email)||(this.errors.email="Please enter a valid email address",e=!1),this.formData.message.trim().length<10&&(this.errors.message="Please enter a message (at least 10 characters)",e=!1),e},async handleSubmit(){if(this.submitError="",!!this.validateForm()){this.isSubmitting=!0;try{const e={name:d(this.formData.name),email:d(this.formData.email),subject:"Contact Form Submission",message:d(this.formData.message)},t=await D(e);if(t.success){this.isSubmitted=!0;const{gtag:c}=F();c("event","contact_form_submission",{event_category:"form_submission",event_label:"contact"})}else this.submitError=t.error||"Something went wrong. Please try again."}catch{this.submitError="Something went wrong. Please try again."}finally{this.isSubmitting=!1}}}}}),M={class:"contact-page"},q={class:"contact-header"},U={class:"container"},L={class:"eyebrow"},j={class:"subtitle"},z={class:"form-section"},T={class:"container"},G={class:"contact-wrapper"},H={key:0,class:"form-container"},W={class:"input-wrapper"},A={key:0,class:"input-error"},Y={class:"privacy-notice"},J={key:0,class:"submit-error"},K={key:1,class:"success-message"};function O(e,t,c,Q,R,X){const b=u("Navigation"),p=u("Input"),f=y,g=u("Button"),v=u("Footer");return l(),n("div",M,[a(b),s("section",q,[s("div",U,[s("span",L,r(e.$t("nav.contactUs")),1),s("h1",null,r(e.$t("contact.title")),1),s("p",j,r(e.$t("contact.subtitle")),1)])]),s("section",z,[s("div",T,[s("div",G,[e.isSubmitted?(l(),n("div",K,[t[8]||(t[8]=s("div",{class:"success-icon"},[s("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[s("circle",{cx:"32",cy:"32",r:"32",fill:"#E8F5E9"}),s("path",{d:"M28 32L30 34L36 28",stroke:"#4CAF50","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)),t[9]||(t[9]=s("h2",null,"Message Sent!",-1)),t[10]||(t[10]=s("p",null,"Thanks for reaching out. We'll get back to you soon.",-1)),a(f,{to:e.localePath("/"),class:"back-link"},{default:m(()=>[a(g,{variant:"secondary",size:"md"},{default:m(()=>[...t[7]||(t[7]=[i("Back to Home",-1)])]),_:1})]),_:1},8,["to"])])):(l(),n("div",H,[s("form",{onSubmit:t[3]||(t[3]=N((...o)=>e.handleSubmit&&e.handleSubmit(...o),["prevent"])),class:"contact-form"},[a(p,{modelValue:e.formData.name,"onUpdate:modelValue":t[0]||(t[0]=o=>e.formData.name=o),label:"Name",type:"text",placeholder:"Your name",required:"",error:e.errors.name,autocomplete:"name"},null,8,["modelValue","error"]),a(p,{modelValue:e.formData.email,"onUpdate:modelValue":t[1]||(t[1]=o=>e.formData.email=o),label:"Email",type:"email",placeholder:"[email protected]",required:"",error:e.errors.email,autocomplete:"email"},null,8,["modelValue","error"]),s("div",W,[t[4]||(t[4]=s("label",{class:"input-label"},[i("Message "),s("span",{class:"required"},"*")],-1)),C(s("textarea",{"onUpdate:modelValue":t[2]||(t[2]=o=>e.formData.message=o),class:"textarea-input",placeholder:"How can we help?",rows:"4",required:""},null,512),[[$,e.formData.message]]),e.errors.message?(l(),n("span",A,r(e.errors.message),1)):h("",!0)]),s("p",Y,[t[5]||(t[5]=i(" By submitting this form, you agree to our ",-1)),a(f,{to:e.localePath("/privacy")},{default:m(()=>
1[i(r(e.$t("footer.privacyPolicy")),1)]),_:1},8,["to"]),t[6]||(t[6]=i(". ",-1))]),a(g,{type:"submit",variant:"primary",size:"lg",disabled:e.isSubmitting,class:"submit-btn"},{default:m(()=>[i(r(e.isSubmitting?"Sending...":"Send Message"),1)]),_:1},8,["disabled"]),e.submitError?(l(),n("p",J,r(e.submitError),1)):h("",!0)],32)]))])])]),a(v)])}const re=B(I,[["render",O],["__scopeId","data-v-512d5188"]]);export{re 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.