PageSourceSearch

https://www.cancerrehabfoundation.org/assets/Contact-D7usFmIj.js

js cancerrehabfoundation.org collected 2026-10-04 04:48:59 UTC 7,499 bytes, 2 lines download raw bytes

1import{c as w,i as T,k,r as i,l as C,j as e,s as W,m as A,n as M,T as t,o as D,a as R,B as a,C as N,S as b,q as x,G as p,t as z,M as I,v as B,d as j,p as q}from"./index-BzWI6jTl.js";import{S as E}from"./SEO-CuiNDLft.js";import{A as S}from"./Alert-Dk04jDEV.js";import{T as g}from"./TextField-DrjVtrXW.js";import"./Select-B3W1U7KD.js";import"./useFormControl-DajLAmEV.js";const P=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],U=w("send",P);function _(r){return T("MuiAlertTitle",r)}k("MuiAlertTitle",["root"]);const F=r=>{const{classes:l}=r;return M({root:["root"]},_,l)},H=W(t,{name:"MuiAlertTitle",slot:"Root"})(D(({theme:r})=>({fontWeight:r.typography.fontWeightMedium,marginTop:-2}))),G=i.forwardRef(function(l,s){const c=C({props:l,name:"MuiAlertTitle"}),{className:m,...h}=c,d=c,n=F(d);return e.jsx(H,{gutterBottom:!0,component:"div",ownerState:d,ref:s,className:A(n.root,m),...h})}),Q=()=>{const[r,l]=i.useState(null),[s,c]=i.useState({name:"",email:"",subject:"",message:""}),[m,h]=i.useState(!1),[d,n]=i.useState(null);i.useEffect(()=>{R.fetch('*[_type == "settings"][0]').then(o=>l(o)).catch(console.error)},[]);const u=o=>{c({...s,[o.target.name]:o.target.value})},v=async o=>{o.preventDefault(),h(!0),n(null);try{if(!(await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})).ok)throw new Error("Failed to submit");n("success"),q({event:"generate_lead",form_name:"Contact Us",form_destination:"Support"}),c({name:"",email:"",subject:"",message:""})}catch(y){console.error("Submission error:",y),n("error")}finally{h(!1)}},f=r?.address||`123 Healing Way, Suite 100
2Medical District, NY 10001`;return e.jsxs(a,{sx:{py:8,minHeight:"100vh",bgcolor:"background.default"},children:[e.jsx(E,{title:"Contact Us",description:"Get in touch with CancerRehab for specialized oncology rehabilitation."}),e.jsxs(N,{maxWidth:"md",children:[e.jsxs(a,{sx:{textAlign:"center",mb:8},children:[e.jsx(t,{variant:"h3",component:"h1",gutterBottom:!0,sx:{fontWeight:700},children:"Get in Touch"}),e.jsx(t,{variant:"h6",color:"text.secondary",sx:{maxWidth:600,mx:"auto"},children:"We are here to help. Reach out to us for appointments, questions, or support."})]}),e.jsxs(b,{spacing:6,children:[e.jsxs(x,{elevation:0,sx:{bgcolor:"primary.50",p:{xs:4,md:6},borderRadius:4},children:[e.jsx(t,{variant:"h5",component:"h2",gutterBottom:!0,sx:{fontWeight:700,mb:4,textAlign:"center"},children:"Contact Information"}),e.jsxs(p,{container:!0,spacing:4,children:[e.jsx(p,{item:!0,xs:12,md:4,children:e.jsxs(a,{component:"a",href:`tel:${(r?.phone||"(555) 123-4567").replace(/[^+\d]/g,"")}`,sx:{display:"flex",flexDirection:"row",alignItems:"center",textDecoration:"none",color:"inherit","&:hover .icon-wrapper":{bgcolor:"primary.main",color:"primary.contrastText",transform:"translateY(-2px)",boxShadow:3},"&:hover .text-target":{color:"primary.main"}},children:[e.jsx(x,{className:"icon-wrapper",elevation:1,sx:{p:{xs:1.5,md:2},borderRadius:2,mr:{xs:2.5,md:2.5},display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"primary.main",bgcolor:"background.paper",transition:"all 0.3s ease"},children:e.jsx(z,{size:24})}),e.jsxs(a,{sx:{flex:1,minWidth:0,textAlign:"left"},children:[e.jsx(t,{variant:"subtitle2",color:"text.secondary",sx:{textTransform:"uppercase",letterSpacing:1,mb:.25},children:"Phone"}),e.jsx(t,{className:"text-target",variant:"h6",sx:{fontWeight:600,wordBreak:"break-word",fontSize:{xs:"1.1rem",md:"1.25rem"},lineHeight:1.3,transition:"color 0.3s ease"},children:r?.phone||"(555) 123-4567"}),e.jsx(t,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:"Mon-Fri 8am-6pm"})]})]})}),e.jsx(p,{item:!0,xs:12,md:4,children:e.jsxs(a,{component:"a",href:`mailto:${r?.email||"[email protected]"}`,sx:{display:"flex",flexDirection:"row",alignItems:"center",textDecoration:"none",color:"inherit","&:hover .icon-wrapper":{bgcolor:"primary.main",color:"primary.contrastText",transform:"translateY(-2px)",boxShadow:3},"&:hover .text-target":{color:"primary.main"}},children:[e.jsx(x,{className:"icon-wrapper",elevation:1,sx:{p:{xs:1.5,md:2},borderRadius:2,mr:{xs:2.5,md:2.5},display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"primary.main",bgcolor:"background.paper",transition:"all 0.3s ease"},children:e.jsx(I,{size:24})}),e.jsxs(a,{sx:{flex:1,minWidth:0,textAlign:"left"},children:[e.jsx(t,{variant:"subtitle2",color:"text.secondary",sx:{textTransform:"uppercase",letterSpacing:1,mb:.25},children:"Email"}),e.jsx(t,{className:"text-target",variant:"h6",sx:{fontWeight:600,wordBreak:"break-word",fontSize:{xs:"1.1rem",md:"1.25rem"},lineHeight:1.3,transition:"color 0.3s ease"},children:r?.email||"[email protected]"}),e.jsx(t,{variant:"body2",color:"text.secondary",sx:{mt:.25},children:"We reply within 24 hours"})]})]})}),e.jsx(p,{item:!0,xs:12,md:4,children:e.jsxs(a,{component:"a",href:`https://maps.google.com/?q=${encodeURIComponent(f)}
2`,target:"_blank",rel:"noopener noreferrer",sx:{display:"flex",flexDirection:"row",alignItems:"center",textDecoration:"none",color:"inherit","&:hover .icon-wrapper":{bgcolor:"primary.main",color:"primary.contrastText",transform:"translateY(-2px)",boxShadow:3},"&:hover .text-target":{color:"primary.main"}},children:[e.jsx(x,{className:"icon-wrapper",elevation:1,sx:{p:{xs:1.5,md:2},borderRadius:2,mr:{xs:2.5,md:2.5},display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:"primary.main",bgcolor:"background.paper",transition:"all 0.3s ease"},children:e.jsx(B,{size:24})}),e.jsxs(a,{sx:{flex:1,minWidth:0,textAlign:"left"},children:[e.jsx(t,{variant:"subtitle2",color:"text.secondary",sx:{textTransform:"uppercase",letterSpacing:1,mb:.25},children:"Location"}),e.jsx(t,{className:"text-target",variant:"h6",sx:{fontWeight:600,whiteSpace:"pre-line",wordBreak:"break-word",fontSize:{xs:"1.1rem",md:"1.25rem"},lineHeight:1.3,transition:"color 0.3s ease"},children:f})]})]})})]})]}),e.jsxs(x,{elevation:3,sx:{p:{xs:4,md:6},borderRadius:4},children:[e.jsx(t,{variant:"h5",component:"h2",gutterBottom:!0,sx:{fontWeight:700,mb:4,textAlign:"center"},children:"Send us a Message"}),d==="success"?e.jsxs(S,{severity:"success",variant:"filled",sx:{borderRadius:2},children:[e.jsx(G,{children:"Message Sent!"}),"Thank you for reaching out. We will get back to you shortly.",e.jsx(j,{color:"inherit",size:"small",onClick:()=>n(null),sx:{display:"block",mt:1,textDecoration:"underline"},children:"Send another message"})]}):e.jsx("form",{onSubmit:v,children:e.jsxs(b,{spacing:3,children:[e.jsx(g,{label:"Full Name",name:"name",value:s.name,onChange:u,required:!0,fullWidth:!0,variant:"outlined"}),e.jsx(g,{label:"Email Address",name:"email",type:"email",value:s.email,onChange:u,required:!0,fullWidth:!0,variant:"outlined"}),e.jsx(g,{label:"Subject",name:"subject",value:s.subject,onChange:u,required:!0,fullWidth:!0,variant:"outlined"}),e.jsx(g,{label:"Message",name:"message",value:s.message,onChange:u,required:!0,fullWidth:!0,multiline:!0,rows:4,variant:"outlined"}),e.jsx(j,{type:"submit",variant:"contained",size:"large",disabled:m,endIcon:!m&&e.jsx(U,{size:18}),sx:{py:1.5},children:m?"Sending...":"Send Message"}),d==="error"&&e.jsx(S,{severity:"error",children:"Something went wrong. Please try again or call us directly."})]})})]})]})]})]})};export{Q as default};

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.