1import{a as e,r as t}from"./utils-KNdIxHLD.js";import{r as n}from"./useRouter-cqa85HvV.js";import{t as r}from"./link-BCAXn4Xn.js";import{i,n as a,t as o}from"./label-DLOsmE9x.js";import{t as s}from"./circle-check-Bwo1O_eg.js";import{P as c,at as l,ot as u}from"./index-AsIGSPc5.js";import{n as d,t as f}from"./leads.functions-BDJBfIiM.js";var p=e(n(),1),m=t();function h(){let e=i(f),[t,n]=(0,p.useState)(!1),[h,g]=(0,p.useState)(!1),[_,v]=(0,p.useState)(!1),[y,b]=(0,p.useState)(!1),[x,S]=(0,p.useState)(!1),[C,w]=(0,p.useState)(null);return y?(0,m.jsxs)(`div`,{id:`estimate`,className:`scroll-mt-[104px] border-t-4 border-emergency bg-white p-10 text-center text-charcoal`,children:[(0,m.jsx)(s,{className:`mx-auto size-12 text-primary`}),(0,m.jsx)(`h3`,{className:`type-display mt-4 text-2xl text-primary`,children:`Request received`}),(0,m.jsx)(`p`,{className:`mx-auto mt-3 max-w-sm text-muted-foreground`,children:`Thanks â we'll call you back within 15 minutes during business hours.`}),(0,m.jsx)(c,{variant:`outline`,className:`mt-6`,onClick:()=>{b(!1),n(!1)},children:`Send another request`})]}):(0,m.jsxs)(`form`,{id:`estimate`,onSubmit:async n=>{n.preventDefault();let r=new FormData(n.currentTarget),i=String(r.get(`service`)??``);S(!0),w(null);try{await e({data:{name:String(r.get(`name`)??``),phone:String(r.get(`phone`)??``),email:String(r.get(`email`)??``),service:i,message:String(r.get(`message`)??``),company:String(r.get(`company`)??``),consent:t,smsTransactional:h,smsMarketing:_,pageSource:typeof window>`u`?``:window.location.pathname}}),b(!0),u(`generate_lead`,{service:i,page_path:window.location.pathname})}catch(e){w(e instanceof Error&&e.message?e.message:`Something went wrong. Please call us at (210) 982-0647.`)}finally{S(!1)}},className:`scroll-mt-[104px] border-t-4 border-emergency bg-white p-6 text-charcoal sm:p-8`,children:[(0,m.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,m.jsxs)(`div`,{className:`grid gap-2`,children:[(0,m.jsx)(o,{htmlFor:`name`,children:`Name`}),(0,m.jsx)(a,{className:`h-[52px] border-2`,id:`name`,name:`name`,required:!0,placeholder:`Your full name`,autoComplete:`name`})]}),(0,m.jsxs)(`div`,{className:`grid gap-2`,children:[(0,m.jsx)(o,{htmlFor:`phone`,children:`Phone`}),(0,m.jsx)(a,{id:`phone`,name:`phone`,type:`tel`,required:!0,placeholder:`Your phone number`,autoComplete:`tel`})]}),(0,m.jsxs)(`div`,{className:`grid gap-2 sm:col-span-2`,children:[(0,m.jsx)(o,{htmlFor:`email`,children:`Email`}),(0,m.jsx)(a,{id:`email`,name:`email`,type:`email`,required:!0,placeholder:`[email protected]`,autoComplete:`email`})]}),(0,m.jsxs)(`div`,{className:`grid gap-2 sm:col-span-2`,children:[(0,m.jsx)(o,{htmlFor:`service`,children:`Service needed`}),(0,m.jsxs)(`select`,{id:`service`,name:`service`,required:!0,defaultValue:``,className:`h-[52px] w-full border-2 border-input bg-white px-3 text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary`,children:[(0,m.jsx)(`option`,{value:``,disabled:!0,children:`Select a service`}),l.map(e=>(0,m.jsx)(`option`,{value:e,children:e},e))]})]}),(0,m.jsxs)(`div`,{className:`grid gap-2 sm:col-span-2`,children:[(0,m.jsx)(o,{htmlFor:`message`,children:`How can we help?`}),(0,m.jsx)(d,{className:`border-2`,id:`message`,name:`message`,rows:4,placeholder:`Tell us what happened and when.`})]}),(0,m.jsxs)(`div`,{className:`hidden`,"aria-hidden":`true`,children:[(0,m.jsx)(`label`,{htmlFor:`company`,children:`Company`}),(0,m.jsx)(`input`,{id:`company`,name:`company`,type:`text`,tabIndex:-1,autoComplete:`off`})]})]}),(0,m.jsxs)(`label`,{htmlFor:`consent`,className:`mt-5 flex cursor-pointer items-start gap-3 text-sm font-normal leading-snug text-muted-foreground`,children:[(0,m.jsx)(`input`,{type:`checkbox`,id:`consent`,name:`consent`,checked:t,onChange:e=>n(e.target.checked),className:`mt-0.5 h-4 w-4 shrink-0 rounded border border-primary accent-primary`}),(0,m.jsx)(`span`,{children:`I agree to be contacted about my request.`})]}),(0,m.jsxs)(`label`,{htmlFor:`smsTransactional`,className:`mt-3 flex cursor-pointer items-start gap-3 text-sm font-normal leading-snug text-muted-foreground`,children:[(0,m.jsx)(`input`,{type:`checkbox`,id:`smsTransactional`,name:`smsTransactional`,value:`yes`,checked:h,onChange:e=>g(e.target.checked),className:`mt-0.5 h-4 w-4 shrink-0 rounded border border-primary accent-primary`,"aria-label":`I consent to receive transactional messages from Fresh Air Restoration & Cleaning (Sanitary Air Inc) at the phone number provided, such as appointment confirmations, reminders, and job updates. Message frequency may vary. Message and data rates may apply. Reply STOP to unsubscribe or HELP for help.`,title:`I consent to receive transactional messages from Fresh Air Restoration & Cleaning (Sanitary Air Inc) at the phone number provided, such as appointment confirmations, reminders, and job updates. Message frequency may vary. Message and data rates may apply. Reply STOP to unsubscribe or HELP for help.`,"data-consent-text":`I consent to receive transactional messages from Fresh Air Restoration & Cleaning (Sanitary Air Inc) at the phone number provided, such as appointment confirmations, reminders, and job updates. Message frequency may vary. Message and data rates may apply. Reply STOP to unsubscribe or HELP for help.`}),(0,m.jsx)(`span`,{children:`I consent to receive transactional messages from Fresh Air Restoration & Cleaning (Sanitary Air Inc) at the phone number provided, such as appointment confirmations, reminders, and job updates. Message frequency may vary. Message and data rates may apply. Reply STOP to unsubscribe or HELP for help.`})]}),(0,m.jsxs)(`label`,{htmlFor:`smsMarketing`,className:`mt-3 flex cursor-pointer items-start gap-3 text-sm font-normal leading-snug text-muted-foreground`,children:[(0,m.jsx)(`input`,{type:`checkbox`,id:`smsMarketing`,name:`smsMarketing`,value:`yes`,checked:_,onChange:e=>v(e.target.checked),className:`mt-0.5 h-4 w-4 shrink-0 rounded border border-primary accent-primary`,"aria-label":`I consent to receive marketing and promotional messages from Fresh Air Restoration & Cleaning (Sanitary Air Inc) at the phone number provided. Message frequency may vary. Message and data rates may apply. Reply STOP to unsubscribe or HELP for help.`,title:`I consent to receive marketing and promotional messages from Fresh Air Restoration & Cleaning (Sanitary Air Inc) at the phone number provided. Message frequency may vary. Message and data rates may apply. Reply STOP to unsubscribe or HELP for help.`,"data-consent-text":`I consent to receive marketing and promotional messages from Fresh Air Restoration & Cleaning (Sanitary Air Inc) at the phone number provided. Message frequency may vary. Message and data rates may apply. Reply STOP to unsubscribe or HELP for help.`}),(0,m.jsx)(`span`,{children:`I consent to receive marketing and promotional messages from Fresh Air Restoration & Cleaning (Sanitary Air Inc) at the phone number provided. Message frequency may vary. Message and data rates may apply. Reply STOP to unsubscribe or HELP for help.`})]}),(0,m.jsxs)(`p`,{className:`mt-3 text-xs text-muted-foreground`,children:[`Consent is not a condition of purchase. Mobile information will not be shared with third parties or affiliates for marketing purposes. See our`,` `,(0,m.jsx)(r,{to:`/privacy`,className:`underline`,children:`Privacy Policy`}),` and `,(0,m.jsx)(r,{to:`/terms`,className:`underline`,children:`Terms of Service`}),`.`]}),C?(0,m.jsx)(`p`,{className:`mt-4 text-sm font-medium text-emergency`,children:C}):null,(0,m.jsx)(c,{type:`submit`,variant:`emergency`,size:`xl`,className:`mt-6 w-full`,disabled:!t||x,children:x?`Sendingâ¦`:`Get My Free Estimate`})]})}
1export{h as t};
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.