1import{C as e,J as t,X as n,g as r,h as i,i as a}from"./site-p3-_hhvX.js";import{u as o}from"./index-DVWKdLQ7.js";var s=r(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),c=n(t(),1),l=e(),u=`mt-2 w-full rounded-sm border border-input bg-background px-4 py-3 text-base text-foreground outline-none focus:border-primary`;function d({defaultService:e=``,defaultCity:t=``,title:n=`Get your free mold inspection`,intro:r=`Tell us what you're seeing. We'll call you back ASAP â usually the same day.`}){let[d,f]=(0,c.useState)({name:``,phone:``,email:``,city:t,service:e,message:``,website:``}),[p,m]=(0,c.useState)(`idle`),h=e=>t=>f({...d,[e]:t.target.value});async function g(e){e.preventDefault(),m(`sending`);try{let e=await fetch(`/api/public/lead`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...d,source_path:window.location.pathname})});m(e.ok?`done`:`error`)}catch{m(`error`)}}return(0,l.jsx)(`div`,{className:`rounded-sm border border-border bg-card p-6 text-card-foreground md:p-8`,children:p===`done`?(0,l.jsxs)(`div`,{role:`status`,children:[(0,l.jsx)(s,{className:`h-10 w-10 text-primary`,"aria-hidden":!0}),(0,l.jsx)(`h2`,{className:`mt-4 text-2xl md:text-3xl`,children:`Thanks â we'll call you ASAP.`}),(0,l.jsx)(`p`,{className:`mt-3 leading-relaxed text-muted-foreground`,children:`We got your request and sent a confirmation to your email. If it's urgent, call us now.`}),(0,l.jsxs)(`a`,{href:a.phoneHref,className:`mt-5 inline-flex items-center gap-2 rounded-sm bg-primary-button px-6 py-3.5 font-display text-[1.0625rem] font-bold text-primary-foreground hover:bg-primary-button-hover sm:text-lg`,children:[(0,l.jsx)(i,{className:`h-4 w-4`,"aria-hidden":!0}),`Call `,a.phone]})]}):(0,l.jsxs)(`form`,{onSubmit:g,className:`grid gap-4`,children:[(0,l.jsxs)(`div`,{children:[(0,l.jsx)(`h2`,{className:`text-2xl md:text-3xl`,children:n}),(0,l.jsx)(`p`,{className:`mt-2 text-muted-foreground`,children:r})]}),(0,l.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,l.jsxs)(`label`,{className:`block`,children:[(0,l.jsx)(`span`,{className:`text-base font-semibold`,children:`Name`}),(0,l.jsx)(`input`,{required:!0,name:`name`,autoComplete:`name`,value:d.name,onChange:h(`name`),className:u})]}),(0,l.jsxs)(`label`,{className:`block`,children:[(0,l.jsx)(`span`,{className:`text-base font-semibold`,children:`Phone`}),(0,l.jsx)(`input`,{required:!0,name:`phone`,type:`tel`,autoComplete:`tel`,value:d.phone,onChange:h(`phone`),className:u})]}),(0,l.jsxs)(`label`,{className:`block`,children:[(0,l.jsx)(`span`,{className:`text-base font-semibold`,children:`Email`}),(0,l.jsx)(`input`,{required:!0,name:`email`,type:`email`,autoComplete:`email`,value:d.email,onChange:h(`email`),className:u})]}),(0,l.jsxs)(`label`,{className:`block`,children:[(0,l.jsx)(`span`,{className:`text-base font-semibold`,children:`Property city`}),(0,l.jsx)(`input`,{name:`city`,value:d.city,onChange:h(`city`),placeholder:`Carlsbad, La Jollaâ¦`,className:u})]})]}),(0,l.jsxs)(`label`,{className:`block`,children:[(0,l.jsx)(`span`,{className:`text-base font-semibold`,children:`Service`}),(0,l.jsxs)(`select`,{name:`service`,value:d.service,onChange:h(`service`),className:u,children:[(0,l.jsx)(`option`,{value:``,children:`Not sure â help me figure it out`}),o.map(e=>(0,l.jsx)(`option`,{value:e.shortName,children:e.shortName},e.slug))]})]}),(0,l.jsxs)(`label`,{className:`block`,children:[(0,l.jsx)(`span`,{className:`text-base font-semibold`,children:`What are you seeing?`}),(0,l.jsx)(`textarea`,{name:`message`,rows:4,value:d.message,onChange:h(`message`),placeholder:`Musty smell in the back bedroom, stain on the ceilingâ¦`,className:u})]}),(0,l.jsx)(`input`,{type:`text`,name:`website`,tabIndex:-1,autoComplete:`off`,value:d.website,onChange:h(`website`),className:`hidden`,"aria-hidden":!0}),p===`error`&&(0,l.jsxs)(`p`,{role:`alert`,className:`text-base font-semibold text-destructive`,children:[`Something went wrong sending your request. Please call us at`,` `,(0,l.jsx)(`a`,{href:a.phoneHref,className:`underline`,children:a.phone}),`.`]}),(0,l.jsx)(`button`,{type:`submit`,disabled:p===`sending`,className:`justify-self-start rounded-sm bg-primary-button px-7 py-3.5 font-display text-[1.0625rem] font-bold text-primary-foreground hover:bg-primary-button-hover disabled:opacity-60 sm:text-lg`,children:p===`sending`?`Sendingâ¦`:`Request my free inspection`}),(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Free for homeowners and property managers. No obligation.`})]})})}export{d 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.