1import{i as e,n as t,t as n}from"./jsx-runtime-Cltr0gcK.js";import{I as r,K as i}from"./site-footer-D1sov-u7.js";import{n as a,t as o}from"./createServerFn-Bk23-1SV.js";import{t as s}from"./check-Z8BZJtXe.js";import{H as c,V as l,Z as u,_ as d,v as f}from"./index-Ccs6LMpp.js";var p=e(t()),m=o({method:`POST`}).handler(a(`fbaaeece99b2a6e0e7f784ac00cd87823d5155c1dc258d50c844c46fdfda3548`)),h=n(),g=`mt-2 block w-full min-h-11 border border-ink/30 bg-cream px-3 py-2 text-base text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink`;function _(){let{reason:e}=d.useSearch(),t=u(m),[n,a]=(0,p.useState)(e??``),[o,_]=(0,p.useState)(`idle`);async function y(e){e.preventDefault();let r=new FormData(e.currentTarget),i=e=>String(r.get(e)??``);if(n){_(`sending`);try{let e=await t({data:{reason:n,name:i(`name`),email:i(`email`),phone:i(`phone`),company:i(`company`),city:i(`city`),state:i(`state`),message:i(`message`)}});_(e.ok?`sent`:`error`)}catch{_(`error`)}}}return(0,h.jsxs)(l,{children:[(0,h.jsx)(c,{eyebrow:`Contact Yéyo`,title:`Talk to the Yéyo team.`,copy:`Retailers, bars, distributors, press, partners and customers â choose a reason and your message goes straight to the right people.`}),(0,h.jsx)(`section`,{className:`pb-24`,children:(0,h.jsxs)(`div`,{className:`page-gutter mx-auto max-w-2xl`,children:[(0,h.jsxs)(`p`,{className:`text-sm text-on-light-muted`,children:[`Looking for Yéyo at a specific store, bar or restaurant? Use `,(0,h.jsx)(i,{to:`/find-us`,hash:`request-yeyo`,className:`underline underline-offset-4`,children:`Request Yéyo`}),` instead.`]}),o===`sent`?(0,h.jsxs)(`p`,{role:`status`,className:`mt-10 flex items-center gap-2 border-t border-ink/20 pt-6 font-display text-2xl`,children:[(0,h.jsx)(s,{"aria-hidden":`true`,className:`size-5`}),` Thank you â your message is with the Yéyo team.`]}):(0,h.jsxs)(`form`,{onSubmit:y,className:`mt-10 grid gap-5 border-t border-ink/20 pt-8 sm:grid-cols-2`,children:[(0,h.jsxs)(`label`,{className:`sm:col-span-2 eyebrow text-on-light-muted`,children:[`Reason for contacting Yéyo *`,(0,h.jsxs)(`select`,{required:!0,value:n,onChange:e=>a(e.target.value),className:g,children:[(0,h.jsx)(`option`,{value:``,disabled:!0,children:`Select a reason`}),f.map(e=>(0,h.jsx)(`option`,{value:e.key,children:e.label},e.key))]})]}),(0,h.jsx)(v,{name:`name`,label:`Name *`,required:!0,autoComplete:`name`}),(0,h.jsx)(v,{name:`email`,label:`Email *`,type:`email`,required:!0,autoComplete:`email`}),(0,h.jsx)(v,{name:`phone`,label:`Phone (optional)`,type:`tel`,autoComplete:`tel`}),(0,h.jsx)(v,{name:`company`,label:`Company / Organization (optional)`,autoComplete:`organization`}),(0,h.jsx)(v,{name:`city`,label:`City *`,required:!0,autoComplete:`address-level2`}),(0,h.jsx)(v,{name:`state`,label:`State *`,required:!0,autoComplete:`address-level1`}),(0,h.jsxs)(`label`,{className:`sm:col-span-2 eyebrow text-on-light-muted`,children:[`Message *`,(0,h.jsx)(`textarea`,{name:`message`,required:!0,maxLength:3e3,rows:6,className:g})]}),o===`error`?(0,h.jsx)(`p`,{role:`alert`,className:`sm:col-span-2 text-sm`,children:`Something went wrong. Please try again.`}):null,(0,h.jsx)(`div`,{className:`sm:col-span-2`,children:(0,h.jsx)(r,{type:`submit`,variant:`editorial`,disabled:o===`sending`,className:`w-full sm:w-auto`,children:o===`sending`?`Sendingâ¦`:`Send message`})})]})]})})]})}function v({name:e,label:t,...n}){return(0,h.jsxs)(`label`,{className:`eyebrow text-on-light-muted`,children:[t,(0,h.jsx)(`input`,{name:e,maxLength:255,className:g,...n})]})}export{_ 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.