1import{a as m,j as e}from"./query-Ban24u4e.js";import{f as H,o as R,H as B,m as n,F as r,p as s,q as E,l as A,C as V,A as C,B as T,i as D}from"./index-jvhwSSW_.js";import{I as x}from"./input-DcaHre60.js";import{d as z}from"./radix-ui-DdasXo-Q.js";import{P as _,M as F}from"./phone-BueQnwTw.js";import{C as J}from"./circle-check-2-BAdcva.js";import{C as L}from"./circle-alert-BHEc1-J8.js";const P=m.forwardRef(({className:a,...o},d)=>e.jsx("textarea",{className:H("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",a),ref:d,...o}));P.displayName="Textarea";const U=R("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),c=m.forwardRef(({className:a,...o},d)=>e.jsx(z,{ref:d,className:H(U(),a),...o}));c.displayName=z.displayName;const u="https://ctvcam.com",g=`${u}/contact`,p="Contact CTVCam â Commercial Security Camera Specialists",y="Get in touch with CTVCam. Request a quote, ask about security camera systems, or reach our support team. Call (254) 220-6439 or email [email protected].",I=`${u}/og-image.png`,W={"@context":"https://schema.org","@type":"ContactPage","@id":`${g}#webpage`,name:p,url:g,isPartOf:{"@id":`${u}/#website`},about:{"@id":`${u}/#organization`}},l={hidden:{opacity:0,y:24},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeOut"}}},b={hidden:{},visible:{transition:{staggerChildren:.1}}},G=a=>a==="email"?e.jsx(F,{size:16}):e.jsx(_,{size:16});function re(){const[a,o]=m.useState("idle"),[d,j]=m.useState(""),[h,N]=m.useState("");async function $(t){t.preventDefault();const v=t.currentTarget,i=new FormData(v);if(i.get("_gotcha"))return;const q=String(i.get("name")??"").trim(),O=String(i.get("email")??"").trim(),w=String(i.get("company")??"").trim(),S=String(i.get("phone")??"").trim(),K=String(i.get("topic")??"").trim(),M=String(i.get("message")??"").trim();o("sending"),j("");try{const k=await(await fetch("/api/contact/contact-us",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversation:{messages_attributes:[{body:M||"New contact form submission"}],data:{__gd_contact_form_title:"Contact Us",...K&&{Topic:K},...w&&{Company:w},...S&&{Phone:S}}},user:{email:O,name:q}})})).json();if(k.success)o("success"),v.reset(),N("");else throw new Error(k.error||"Something went wrong.")}catch(f){o("error"),j(f instanceof Error?f.message:"Something went wrong. Please try again.")}}return e.jsxs(e.Fragment,{children:[e.jsxs(B,{children:[e.jsx("title",{children:p}),e.jsx("meta",{name:"description",content:y}),e.jsx("link",{rel:"canonical",href:g}),e.jsx("meta",{property:"og:title",content:p}),e.jsx("meta",{property:"og:description",content:y}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:g}),e.jsx("meta",{property:"og:image",content:I}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:p}),e.jsx("meta",{name:"twitter:description",content:y}),e.jsx("meta",{name:"twitter:image",content:I}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(W)})]}),e.jsxs("main",{className:"pt-20",children:[e.jsx("section",{className:"py-16 md:py-24 bg-card/20 border-b border-border/30",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs(n.div,{initial:"hidden",animate:"visible",variants:b,className:"max-w-2xl",children:[e.jsx(n.p,{variants:l,className:"text-primary text-sm font-semibold tracking-wide uppercase mb-3",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"be803d",guard:{file:"src/pages/contact.tsx",tagName:"p",sourceKind:"content-key",contentKey:"contact.hero.eyebrow",contentKeyTemplate:null,expressionHash:null},children:s.hero.eyebrow})}),e.jsx(n.h1,{variants:l,className:"text-4xl md:text-5xl font-bold text-foreground leading-tight mb-4",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"8a5ee6",guard:{file:"src/pages/contact.tsx",tagName:"h1",sourceKind:"content-key",contentKey:"contact.hero.headline",contentKeyTemplate:null,expressionH
1ash:null},children:s.hero.headline})}),e.jsx(n.p,{variants:l,className:"text-lg text-muted-foreground leading-relaxed",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"be803e",guard:{file:"src/pages/contact.tsx",tagName:"p",sourceKind:"content-key",contentKey:"contact.hero.subheadline",contentKeyTemplate:null,expressionHash:null},children:s.hero.subheadline})})]})})}),e.jsx("section",{className:"py-16 md:py-24",children:e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-12 lg:gap-16",children:[e.jsxs(n.div,{initial:"hidden",animate:"visible",variants:b,className:"lg:col-span-2 flex flex-col gap-8",children:[e.jsxs(n.div,{variants:l,className:"bg-card border border-border/40 rounded-2xl p-6",children:[e.jsx("h2",{className:"text-foreground font-bold text-lg mb-5",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"4d1330",guard:{file:"src/pages/contact.tsx",tagName:"h2",sourceKind:"content-key",contentKey:"contact.office.headline",contentKeyTemplate:null,expressionHash:null},children:s.office.headline})}),e.jsxs("div",{className:"flex gap-3 mb-4",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shrink-0 mt-0.5",children:e.jsx(E,{size:15})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-foreground text-sm font-medium",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"046dcf",guard:{file:"src/pages/contact.tsx",tagName:"p",sourceKind:"content-key",contentKey:"contact.office.address.street",contentKeyTemplate:null,expressionHash:null},children:s.office.address.street})}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:[s.office.address.city,", ",s.office.address.state," ",s.office.address.zip]})]})]}),e.jsxs("div",{className:"flex gap-3 mb-4",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shrink-0",children:e.jsx(_,{size:15})}),e.jsx("a",{href:`tel:${s.office.phone.replace(/\s/g,"")}`,className:"text-foreground text-sm font-medium hover:text-primary transition-colors self-center",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"047d6c",guard:{file:"src/pages/contact.tsx",tagName:"a",sourceKind:"content-key",contentKey:"contact.office.phone",contentKeyTemplate:null,expressionHash:null},children:s.office.phone})})]}),e.jsxs("div",{className:"flex gap-3 mb-5",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shrink-0",children:e.jsx(F,{size:15})}),e.jsx("a",{href:`mailto:${s.office.email}`,className:"text-foreground text-sm font-medium hover:text-primary transition-colors self-center",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"1695ed",guard:{file:"src/pages/contact.tsx",tagName:"a",sourceKind:"content-key",contentKey:"contact.office.email",contentKeyTemplate:null,expressionHash:null},children:s.office.email})})]}),e.jsx(A,{className:"bg-border/40 mb-5"}),e.jsxs("div",{className:"flex gap-3 mb-4",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shrink-0 mt-0.5",children:e.jsx(V,{size:15})}),e.jsx("div",{className:"flex flex-col gap-1.5",children:s.office.hours.map(t=>e.jsxs("div",{className:"flex justify-between gap-4 text-sm",children:[e.jsx("span",{className:"text-muted-foreground",style:{whiteSpace:"pre-line"},children:t.days}),e.jsx("span",{className:"text-foreground font-medium",style:{whiteSpace:"pre-line"},children:t.time})]},t.id))})]}),e.jsx("p",{className:"text-xs text-primary/80 bg-primary/5 border border-primary/15 rounded-lg px-3 py-2 mt-2",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"76d326",guard:{file:"src/pages/contact.tsx",tagName:"p",sourceKind:"content-key",contentKey:"contact.office.emergencyNote",contentKeyTemplate:null,expressionHash:null},children:s.office.emergencyNote})})]}),e.jsx(n.div,{variants:l,className:"flex flex-col gap-3",children:s.channels.map(t=>e.jsxs("a",{href:t.type==="email"?`mailto:${t.value}
1`:`tel:${t.value.replace(/\s/g,"")}`,className:"flex items-center gap-3 bg-card border border-border/40 rounded-xl px-4 py-3 hover:border-primary/40 transition-colors group",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center text-primary group-hover:bg-primary/20 transition-colors",children:G(t.type)}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground",style:{whiteSpace:"pre-line"},children:t.label}),e.jsx("p",{className:"text-sm font-medium text-foreground truncate",style:{whiteSpace:"pre-line"},children:t.value})]}),e.jsx(C,{size:14,className:"text-muted-foreground group-hover:text-primary transition-colors shrink-0"})]},t.id))})]}),e.jsx(n.div,{initial:"hidden",animate:"visible",variants:b,className:"lg:col-span-3",children:e.jsx(n.div,{variants:l,className:"bg-card border border-border/40 rounded-2xl p-6 md:p-8",children:a==="success"?e.jsxs(n.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.4,ease:"easeOut"},className:"flex flex-col items-center text-center py-10",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-green-500/10 border border-green-500/30 flex items-center justify-center mb-5",children:e.jsx(J,{size:30,className:"text-green-500"})}),e.jsx("h2",{className:"text-foreground font-bold text-xl mb-2",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"ac3f89",guard:{file:"src/pages/contact.tsx",tagName:"h2",sourceKind:"content-key",contentKey:"contact.form.successHeadline",contentKeyTemplate:null,expressionHash:null},children:s.form.successHeadline})}),e.jsx("p",{className:"text-muted-foreground mb-6 max-w-sm",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"05585f",guard:{file:"src/pages/contact.tsx",tagName:"p",sourceKind:"content-key",contentKey:"contact.form.successBody",contentKeyTemplate:null,expressionHash:null},children:s.form.successBody})}),e.jsx(T,{onClick:()=>o("idle"),variant:"outline",className:"border-border/60 text-foreground hover:bg-muted",children:"Send another message"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"text-foreground font-bold text-xl mb-1",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"5b6a45",guard:{file:"src/pages/contact.tsx",tagName:"h2",sourceKind:"content-key",contentKey:"contact.form.headline",contentKeyTemplate:null,expressionHash:null},children:s.form.headline})}),e.jsx("p",{className:"text-muted-foreground text-sm",style:{whiteSpace:"pre-line"},children:e.jsx(r,{devId:"dc1b9b",guard:{file:"src/pages/contact.tsx",tagName:"p",sourceKind:"content-key",contentKey:"contact.form.subheadline",contentKeyTemplate:null,expressionHash:null},children:s.form.subheadline})})]}),e.jsxs("form",{onSubmit:$,noValidate:!0,className:"flex flex-col gap-5",children:[e.jsx("input",{type:"text",name:"_gotcha",tabIndex:-1,autoComplete:"off",style:{position:"absolute",left:"-9999px"},"aria-hidden":"true"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs(c,{htmlFor:"name",className:"text-foreground text-sm font-medium",children:["Full name ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(x,{id:"name",name:"name",required:!0,placeholder:"Jane Smith",className:"bg-background border-border/60 focus:border-primary text-foreground placeholder:text-muted-foreground/60"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs(c,{htmlFor:"email",className:"text-foreground text-sm font-medium",children:["Work email ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(x,{id:"email",name:"email",type:"email",required:!0,placeholder:"[email protected]",className:"bg-background border-border/60 focus:border-primary text-foreground placeholder:text-muted-foreground/60"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(c,{htmlFor:"company",className:"text-foreground text-sm font-medium",children:"Company"}),e.jsx(x,{id:"company",name:"company",placeholder:"Acme Corp",className:"bg-background border-border/60 focus:border-primary text-foreground placeholder:text-muted-foreground
1/60"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx(c,{htmlFor:"phone",className:"text-foreground text-sm font-medium",children:"Phone"}),e.jsx(x,{id:"phone",name:"phone",type:"tel",placeholder:"+1 (312) 555-0100",className:"bg-background border-border/60 focus:border-primary text-foreground placeholder:text-muted-foreground/60"})]})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx(c,{className:"text-foreground text-sm font-medium",children:"What can we help with?"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:s.form.topicOptions.map(t=>e.jsx("button",{type:"button",onClick:()=>N(h===t.label?"":t.label),className:`px-3 py-1.5 rounded-lg text-sm font-medium border transition-all duration-200 ${h===t.label?"bg-primary text-primary-foreground border-primary":"bg-background border-border/60 text-muted-foreground hover:border-primary/50 hover:text-foreground"}`,style:{whiteSpace:"pre-line"},children:t.label},t.id))}),e.jsx("input",{type:"hidden",name:"topic",value:h})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsxs(c,{htmlFor:"message",className:"text-foreground text-sm font-medium",children:["Message ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx(P,{id:"message",name:"message",required:!0,rows:5,placeholder:"Tell us about your project, site size, or any specific requirementsâ¦",className:"bg-background border-border/60 focus:border-primary text-foreground placeholder:text-muted-foreground/60 resize-none"})]}),a==="error"&&e.jsxs("div",{role:"alert",className:"flex items-start gap-2 text-destructive text-sm bg-destructive/10 border border-destructive/30 rounded-lg px-3 py-2",children:[e.jsx(L,{size:15,className:"shrink-0 mt-0.5"}),e.jsx("span",{children:e.jsx(r,{devId:"4568e6",guard:{file:"src/pages/contact.tsx",tagName:"span",sourceKind:"bound-expression",contentKey:null,contentKeyTemplate:null,expressionHash:"sha256:1c0238d2a5401216440d3a40ef09cf8a641cbbc703bbdb0cfe4af2625e4564c6"},children:d})})]}),e.jsx(T,{type:"submit",disabled:a==="sending",size:"lg",className:"w-full bg-primary hover:bg-primary/90 text-primary-foreground font-semibold shadow-[0_0_20px_hsl(var(--primary)/0.3)] hover:shadow-[0_0_30px_hsl(var(--primary)/0.5)] transition-all",children:a==="sending"?e.jsxs(e.Fragment,{children:[e.jsx(D,{size:16,className:"mr-2 animate-spin"}),"Sendingâ¦"]}):e.jsxs(e.Fragment,{children:["Send message",e.jsx(C,{size:16,className:"ml-2"})]})})]})]})})})]})})})]})]})}export{re 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.