1import{o as S,s as m,S as x,r as C,j as e,a2 as b,w as l}from"./vendor-BRR4VqFH.js";import{u as w,B as N,a as T}from"./index-CgwlSxum.js";import{u as v,F as I,a as u,b as d,c as h,d as g,e as M}from"./Form-B2MYpnjU.js";import{I as p}from"./Input-B5mALb97.js";import{T as F}from"./Textarea-DRVae1Wf.js";import{S as k}from"./Spinner-Be0guEb2.js";import{u as P}from"./useCsrfToken-BBr7QxT5.js";import{A as O}from"./Alert-D17dSCBJ.js";import{B}from"./Breadcrumbs-DIXk97Zp.js";import{J as f}from"./JsonLd-BWNZ4f0z.js";import{g as J}from"./ogImageGenerator-Ckb8iYZ-.js";import{g as E}from"./organizationSchema-Brb7Zdkt.js";const y=S({name:m().min(2,"Name must be at least 2 characters long.").max(100,"Name cannot exceed 100 characters."),email:m().email("Please enter a valid email address."),subject:m().min(5,"Subject must be at least 5 characters long.").max(200,"Subject cannot exceed 200 characters."),message:m().min(10,"Message must be at least 10 characters long.").max(2e3,"Message cannot exceed 2000 characters.")}),U=async(r,i)=>{const n=y.parse(r),c=await fetch("/_api/contact/send",{method:"POST",body:x.stringify(n),...i,headers:{"Content-Type":"application/json",...i?.headers??{}}}),s=x.parse(await c.text());if(!c.ok)throw new Error(s.message||"An unknown error occurred");return s},D="_signInNotice_1ufw7_2",V="_form_1ufw7_6",Y="_submitButton_1ufw7_34",j={signInNotice:D,form:V,submitButton:Y},q=()=>{const{csrfToken:r}=P(),{authState:i}=w(),[n,c]=C.useState(!1),s=v({defaultValues:{name:"",email:"",subject:"",message:""},schema:y}),_=async a=>{if(!r){l.error("Security token missing. Please refresh the page and try again.");return}c(!0);try{const t=await U(a,{headers:{"X-CSRF-Token":r}});l.success(t.message||"Thank you for your message. We will get back to you shortly."),s.setValues({name:"",email:"",subject:"",message:""})}catch(t){t instanceof Error?l.error(t.message):l.error("Failed to send message. Please try again.")}finally{c(!1)}};return e.jsxs(I,{...s,children:[i.type==="unauthenticated"&&e.jsxs(O,{className:j.signInNotice,children:["You need an account to send us a message â it keeps this form free of spam."," ",e.jsx(b,{to:"/login",children:"Sign in"})," or ",e.jsx(b,{to:"/register",children:"create an account"}),", then come back here."]}),e.jsxs("form",{onSubmit:s.handleSubmit(_),className:j.form,children:[e.jsxs(u,{name:"name",children:[e.jsx(d,{children:"Name"}),e.jsx(h,{children:e.jsx(p,{placeholder:"Your name",value:s.values.name,onChange:a=>s.setValues(t=>({...t,name:a.target.value})),disabled:n})}),e.jsx(g,{})]}),e.jsxs(u,{name:"email",children:[e.jsx(d,{children:"Email"}),e.jsx(h,{children:e.jsx(p,{type:"email",placeholder:"[email protected]",value:s.values.email,onChange:a=>s.setValues(t=>({...t,email:a.target.value})),disabled:n})}),e.jsx(g,{})]}),e.jsxs(u,{name:"subject",children:[e.jsx(d,{children:"Subject"}),e.jsx(h,{children:e.jsx(p,{placeholder:"What is this regarding?",value:s.values.subject,onChange:a=>s.setValues(t=>({...t,subject:a.target.value})),disabled:n})}),e.jsx(g,{})]}),e.jsxs(u,{name:"message",children:[e.jsx(d,{children:"Message"}),e.jsx(h,{children:e.jsx(F,{placeholder:"Tell us more about your inquiry...",value:s.values.message,onChange:a=>s.setValues(t=>({...t,message:a.target.value})),rows:6,disabled:n})}),e.jsx(M,{children:"Please provide as much detail as possible so we can assist you better."}),e.jsx(g,{})]}),e.jsx(N,{type:"submit",disabled:n,className:j.submitButton,children:n?e.jsxs(e.Fragment,{children:[e.jsx(k,{size:"sm"}),"Sending..."]}):"Send Message"})]})]})},z="_pageContainer_wj5yp_1",A="_breadcrumbs_wj5yp_9",L="_hero_wj5yp_13",G="_title_wj5yp_20",R="_subtitle_wj5yp_29",W="_content_wj5yp_37",H="_formSection_wj5yp_61",X="_sectionTitle_wj5yp_66",o={pageContainer:z,breadcrumbs:A,hero:L,title:G,subtitle:R,content:W,formSection:H,sectionTitle:X},ie=()=>{const r={"@context":"https://schema.org","@type":"ContactPage","@id":"https://dj.community/contact#contactpage",name:"Contact Us",description:"Get in touch with the DJ.COMMUNITY team. Contact us at [email protected] for all inquiries.",mainEntity:{"@type":"Organization","@id":"https://dj.community/#organization",name:"DJ.COMMUNITY",contactPoint:{"@type":"ContactPoint",contactType:"Customer Service",availableLanguage:"English"}}};return e.jsxs(e.Fragment,{children:[e.jsx(T,{title:"Contact DJ.COMMUNITY - Get in Touch",description:"Get in touch with the DJ.COMMUNITY team. Contact us at [email protected] for all inquiries.",url:"/contact",image:J(),type:"website"}),e.jsx(f,{schema:r}),e.jsx(f,{schema:E()}),e.jsxs("div",{className:o.pageContainer,children:[e.jsx(B,{items:[{label:"Contact",href:"/contact"}],className:o.breadcrumbs}),e.jsxs("header",{className:o.hero,children:[e.jsx("h1",{className:o.title,children:"Contact Us"}),e.jsx("p",{className:o.subtitle,children:"We're here to help. Reach out with any questions or feedback."})]}),e.jsx("main",{className:o.content,children:e.jsxs("div",{className:o.formSection,children:[e.jsx("h2",{className:o.sectionTitle,children:"Send Us a Message"}),e.jsx(q,{})]})})]})]})};export{ie 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.