import{r as n,j as e}from"./vendor-react-DgEFbQIi.js";import{u as j}from"./useSeo-eyKuqwK1.js";import{H as x}from"./HelpCenterLayout-DixgH0WP.js";import{H as v}from"./HeroBanner-CCPLhH1N.js";import{S as y}from"./SubmissionSuccess-B22HIbGm.js";import{ca as h,ba as N,T as F}from"./index-DFVuS8SP.js";import{C as i}from"./support-BT2WeAbE.js";import{v as w}from"./supportSubmissions-Dnt2EG69.js";import{S}from"./send-CbUVXki9.js";import"./PageBreadcrumb-nCACiN0q.js";import"./vendor-radix-kdo0k_bv.js";import"./vendor-amplify-BBi2B1tW.js";import"./trending-up-CPKYlz4V.js";import"./book-open-BePocOnz.js";import"./dollar-sign-Cz68EQu2.js";import"./shield-C1NFLCbG.js";import"./credit-card-Cc_cW3L8.js";import"./circle-check-DeY5-glE.js";import"./vendor-motion-CzLrDd6y.js";import"./vendor-maps-bOuA10hf.js";const k={name:"",email:"",phone:"",subject:"",message:""},C=[{icon:h,label:"Email",value:i,href:`mailto:${i}`},{icon:N,label:"Response Time",value:"Within 24 hours"}];function Y(){j({title:"Contact Us | PLEC",description:"Get in touch with the PLEC team. We typically respond within 24 hours."});const[r,p]=n.useState(k),[c,d]=n.useState(!1),[m,b]=n.useState(null),[u,l]=n.useState(null),a=s=>{p(t=>({...t,[s.target.name]:s.target.value}))},f=async s=>{s.preventDefault(),l(null);const t=w(r);if(t.ok===!1){l(t.error);return}d(!0);try{const o=await fetch(F("/support/contact"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t.value)});if(!o.ok)throw new Error("Failed to submit");const g=await o.json();b(g.ticketId)}catch{l(`Something went wrong. Please try again or email us directly at ${i}.`)}finally{d(!1)}};return m?e.jsx(x,{hideRoleTabs:!0,children:e.jsx(y,{title:"Message Received",message:"Thank you for reaching out. We'll get back to you as soon as possible.",ticketId:m})}):e.jsxs(x,{hideRoleTabs:!0,children:[e.jsx(v,{icon:h,title:"Contact Us",subtitle:"Have a question, feedback, or need help? We're here for you.",className:"rounded-2xl px-6 md:px-12 mb-12"}),e.jsxs("div",{className:"max-w-5xl mx-auto grid grid-cols-1 lg:grid-cols-5 gap-12",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx("h2",{className:"text-[#0F0F0F] font-semibold",style:{fontSize:"clamp(1.25rem, 2.5vw, 1.5rem)",lineHeight:"1.3"},children:"Get in Touch"}),e.jsx("div",{className:"space-y-4",children:C.map((s,t)=>{const o=s.icon;return e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-brand-50 flex items-center justify-center flex-shrink-0",children:e.jsx(o,{className:"w-5 h-5 text-brand-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[#4B4B4B] text-sm font-medium",children:s.label}),s.href?e.jsx("a",{href:s.href,className:"text-brand-400 hover:underline font-medium text-sm",children:s.value}):e.jsx("p",{className:"text-[#0F0F0F] font-medium text-sm",children:s.value})]})]},t)})}),e.jsx("div",{className:"bg-brand-50/80 border-l-4 border-brand-400 rounded-r-xl p-5 mt-8",children:e.jsxs("p",{className:"text-[#4B4B4B] text-sm leading-relaxed",children:["For safety-related concerns or to report a violation, please use our"," ",e.jsx("a",{href:"/report-concern",className:"text-brand-400 hover:underline font-medium",children:"Report a Concern"})," ","form for faster routing."]})})]}),e.jsx("div",{className:"lg:col-span-3",children:e.jsxs("form",{onSubmit:f,className:"space-y-5",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"name",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{id:"name",name:"name",type:"text",required:!0,maxLength:200,value:r.name,onChange:a,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors",placeholder:"Your full name"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"email",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Email ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{id:"email",name:"email",type:"email",required:!0,maxLength:254,value:r.email,onChange:a,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors",placeholder:"you@example.com"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-5",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"phone",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Phone ",e.jsx("span",{className:"text-[#4B4B4B] text-xs font-normal",children:"(optional)"})]}),e.jsx("input",{id:"phone",name:"phone",type:"tel",maxLength:30,value:r.phone,onChange:a,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors",placeholder:"(555) 123-4567"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"subject",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Subject ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("select",{id:"subject",name:"subject",required:!0,value:r.subject,onChange:a,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors bg-white",children:[e.jsx("option",{value:"",children:"Select a topic"}),e.jsx("option",{value:"General Inquiry",children:"General Inquiry"}),e.jsx("option",{value:"Booking Help",children:"Booking Help"}),e.jsx("option",{value:"Account Issue",children:"Account Issue"}),e.jsx("option",{value:"Hosting Question",children:"Hosting Question"}),e.jsx("option",{value:"Payment & Billing",children:"Payment & Billing"}),e.jsx("option",{value:"Feedback",children:"Feedback"}),e.jsx("option",{value:"Partnership",children:"Partnership"}),e.jsx("option",{value:"Other",children:"Other"})]})]})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"message",className:"block text-sm font-medium text-[#0F0F0F] mb-1.5",children:["Message ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("textarea",{id:"message",name:"message",required:!0,rows:6,maxLength:5e3,value:r.message,onChange:a,className:"w-full px-4 py-3 border-2 border-gray-200 rounded-xl text-sm focus:outline-none focus:border-brand-400 transition-colors resize-none",placeholder:"How can we help you?"})]}),u&&e.jsx("p",{className:"text-red-600 text-sm",role:"alert",children:u}),e.jsxs("button",{type:"submit",disabled:c,className:"inline-flex items-center gap-2 bg-gradient-to-r from-brand-400 to-brand-500 hover:brightness-90 text-white font-medium px-8 py-3 rounded-xl transition-all duration-300 hover:scale-105 disabled:opacity-50 disabled:hover:scale-100",children:[e.jsx(S,{className:"w-4 h-4"}),c?"Sending...":"Send Message"]})]})})]})]})}export{Y as default};