PageSourceSearch

https://ocdhome.com/_next/static/chunks/contact-inquiry-form-D1g9wPtz.js

js ocdhome.com collected 2026-10-09 23:19:39 UTC 4,177 bytes, 1 lines download raw bytes

1import{r as e}from"./rolldown-runtime-C60lm6uB.js";import{i as t,r as n}from"./framework-D_rUT4EX.js";import{t as r}from"./createLucideIcon-CLApvFWr.js";import{n as i}from"./dist-OTakk3Ty.js";import{t as a}from"./button-l_-xTqL2.js";import{i as o}from"./content-DsmUybjv.js";import{track as s}from"./site-client-Dep1x993.js";var c=r(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),l=e(t(),1),u=n();function d({deliveryEnabled:e=!1}){let[t,n]=(0,l.useState)(``),[r,d]=(0,l.useState)(!1),[f,p]=(0,l.useState)(!1);async function m(t){t.preventDefault();let r=t.currentTarget,i=Object.fromEntries(new FormData(r));if(n(``),d(!1),!i.website){if(!e){let e=`Hello OCD HOME,\n\n${String(i.message).trim()}\n\nName: ${String(i.name).trim()}\nEmail: ${String(i.email).trim()}${i.phone?`\nPhone: ${String(i.phone).trim()}`:``}`;window.location.href=`${o.emailHref}?subject=Home%20%26%20surface%20care%20inquiry%20%7C%20OCD%20HOME&body=${encodeURIComponent(e)}`,s(`contact_email_draft`,{form_name:`general_inquiry`}),n(`Send the draft from your email app to complete your inquiry. If it didn’t open, email [email protected] directly. Your message is still here to copy.`);return}p(!0);try{let e=await fetch(`/api/contact/`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(i)}),t=await e.json();if(!e.ok)throw Error(t.error||`Your message could not be sent. Please call or email our team.`);n(`Thank you. Your message has been sent to our team.`),s(`contact_submit`,{form_name:`general_inquiry`}),r.reset()}catch(e){d(!0),n(e instanceof Error?e.message:`Unable to send. Please call or email our team.`)}finally{p(!1)}}}return(0,u.jsxs)(`form`,{className:`contact-inquiry-form`,onSubmit:m,"aria-label":`Contact OCD HOME`,"aria-describedby":`contact-form-note`,"aria-busy":f,children:[(0,u.jsx)(`p`,{id:`contact-form-note`,className:`contact-form-note`,children:e?`Tell us about your surfaces, a commercial project, or a question about our services.`:`Tell us what you have in mind. We’ll prepare an email for you to review and send from your email app.`}),(0,u.jsxs)(`div`,{className:`contact-field-pair`,children:[(0,u.jsxs)(`label`,{htmlFor:`contact-name`,children:[`Full name `,(0,u.jsx)(`span`,{children:`(required)`}),(0,u.jsx)(`input`,{id:`contact-name`,name:`name`,autoComplete:`name`,required:!0,maxLength:120})]}),(0,u.jsxs)(`label`,{htmlFor:`contact-email`,children:[`Email address `,(0,u.jsx)(`span`,{children:`(required)`}),(0,u.jsx)(`input`,{id:`contact-email`,name:`email`,type:`email`,autoComplete:`email`,required:!0,maxLength:254})]})]}),(0,u.jsxs)(`label`,{htmlFor:`contact-phone`,children:[`Phone number `,(0,u.jsx)(`span`,{children:`(optional)`}),(0,u.jsx)(`input`,{id:`contact-phone`,name:`phone`,type:`tel`,autoComplete:`tel`,maxLength:40})]}),(0,u.jsxs)(`label`,{htmlFor:`contact-message`,children:[`How can we help? `,(0,u.jsx)(`span`,{children:`(required)`}),(0,u.jsx)(`textarea`,{id:`contact-message`,name:`message`,required:!0,minLength:10,maxLength:e?5e3:2e3,rows:5,"aria-describedby":`contact-message-help`})]}),(0,u.jsx)(`p`,{id:`contact-message-help`,className:`contact-form-hint`,children:`Include the surface, your city, and any questions or concerns. At least 10 characters.`}),(0,u.jsx)(`div`,{className:`honeypot`,"aria-hidden":`true`,children:(0,u.jsxs)(`label`,{children:[`Leave this blank`,(0,u.jsx)(`input`,{name:`website`,tabIndex:-1,autoComplete:`off`})]})}),(0,u.jsx)(a,{type:`submit`,className:`contact-page-button contact-submit`,disabled:f,children:e?(0,u.jsxs)(u.Fragment,{children:[f?`Sending…`:`Send Message`,(0,u.jsx)(i,{size:18,"aria-hidden":`true`})]}):(0,u.jsxs)(u.Fragment,{children:[`Continue to Email`,(0,u.jsx)(c,{size:18,"aria-hidden":`true`})]})}),(0,u.jsxs)(`p`,{className:`contact-form-privacy`,children:[`Please leave out sensitive personal information. `,(0,u.jsx)(`a`,{href:`/privacy-policy/`,children:`Privacy Policy`})]}),(0,u.jsx)(`div`,{className:`contact-form-status${r?` is-error`:``}`,role:`status`,"aria-live":`polite`,"aria-atomic":`true`,children:t})]})}
1export{d as ContactInquiryForm};

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.