1import{d as e,l as t,o as n}from"./useStore-CtlXKlrm.js";import{D as r,I as i,t as a}from"./SiteLayout-CSW-hyxq.js";import{h as o,m as s,p as c}from"./index-soGdaXc1.js";import{n as l}from"./label-SACKj2gH.js";import{t as u}from"./textarea-O2rDrPfM.js";import{a as d,c as f,i as p,l as m,n as h,o as g,r as _,s as v,t as y}from"./contact.functions-BgDwx8--.js";var b=e(t()),x=n(),S=s({name:o().trim().min(1,`Name is required`).max(100,`Name must be less than 100 characters`),email:o().trim().email(`Invalid email address`).max(255,`Email must be less than 255 characters`),phone:o().trim().max(50,`Phone must be less than 50 characters`).optional().or(c(``)),message:o().trim().min(1,`Message is required`).max(2e3,`Message must be less than 2000 characters`)});function C(){let[e,t]=(0,b.useState)(!1),[n,o]=(0,b.useState)(null),s=i(y),c=m({resolver:f(S),defaultValues:{name:``,email:``,phone:``,message:``}});async function C(e){o(null);try{await s({data:e}),t(!0),c.reset()}catch(e){o(e instanceof Error?e.message:`Something went wrong. Please try again.`)}}return(0,x.jsx)(a,{children:(0,x.jsxs)(`section`,{className:`mx-auto max-w-2xl px-6 py-20`,children:[(0,x.jsx)(`p`,{className:`text-xs uppercase tracking-[0.2em] text-muted-foreground mb-3`,children:`Studio`}),(0,x.jsx)(`h1`,{className:`text-4xl md:text-5xl`,children:`Contact`}),(0,x.jsxs)(`p`,{className:`mt-6 text-foreground/80`,children:[`For commissions, gallery inquiries, or questions about prints and classes, write to`,` `,(0,x.jsx)(`a`,{className:`underline underline-offset-4`,href:`mailto:[email protected]`,children:`[email protected]`}),`.`]}),(0,x.jsxs)(`p`,{className:`mt-4 text-foreground/80`,children:[`Phone: `,(0,x.jsx)(`a`,{className:`underline underline-offset-4`,href:`tel:657-750-1076`,children:`657-750-1076`}),` â Call or Text`]}),(0,x.jsx)(`p`,{className:`mt-4 text-foreground/80`,children:`You will receive a reply within 24 hours.`}),(0,x.jsxs)(`div`,{className:`mt-14`,children:[(0,x.jsx)(`h2`,{className:`text-xl font-medium mb-2`,children:`Send a message`}),(0,x.jsx)(`p`,{className:`text-sm text-muted-foreground mb-6`,children:`Fill out the form below and I'll get back to you as soon as possible.`}),e?(0,x.jsxs)(`div`,{className:`rounded-md bg-muted p-6 text-center`,children:[(0,x.jsx)(`p`,{className:`font-medium`,children:`Thank you for reaching out!`}),(0,x.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Your message has been sent. We'll reply within 24 hours.`})]}):(0,x.jsx)(h,{...c,children:(0,x.jsxs)(`form`,{onSubmit:c.handleSubmit(C),className:`space-y-5`,children:[(0,x.jsx)(p,{control:c.control,name:`name`,render:({field:e})=>
1(0,x.jsxs)(d,{children:[(0,x.jsx)(g,{children:`Name`}),(0,x.jsx)(_,{children:(0,x.jsx)(l,{placeholder:`Your name`,...e})}),(0,x.jsx)(v,{})]})}),(0,x.jsx)(p,{control:c.control,name:`email`,render:({field:e})=>(0,x.jsxs)(d,{children:[(0,x.jsx)(g,{children:`Email`}),(0,x.jsx)(_,{children:(0,x.jsx)(l,{type:`email`,placeholder:`[email protected]`,...e})}),(0,x.jsx)(v,{})]})}),(0,x.jsx)(p,{control:c.control,name:`phone`,render:({field:e})=>(0,x.jsxs)(d,{children:[(0,x.jsxs)(g,{children:[`Phone `,(0,x.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(optional)`})]}),(0,x.jsx)(_,{children:(0,x.jsx)(l,{type:`tel`,placeholder:`(555) 123-4567`,...e})}),(0,x.jsx)(v,{})]})}),(0,x.jsx)(p,{control:c.control,name:`message`,render:({field:e})=>(0,x.jsxs)(d,{children:[(0,x.jsx)(g,{children:`how can I help you?`}),(0,x.jsx)(_,{children:(0,x.jsx)(u,{placeholder:`Tell me what you're looking for...`,rows:5,...e})}),(0,x.jsx)(v,{})]})}),n&&(0,x.jsx)(`p`,{className:`text-sm text-destructive`,children:n}),(0,x.jsx)(r,{type:`submit`,className:`w-full`,disabled:c.formState.isSubmitting,children:c.formState.isSubmitting?`Sending...`:`Send message`})]})})]})]})})}export{C as component};
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.