import{j as e}from"./query-DJMphkOq.js";import{a as d,P as v,l as k,a6 as j,p as N,q as C,s as S}from"./icons-B6XnNDpJ.js";import{u as _,i as T}from"./index-BaQQEgxi.js";import"./react-vendor-wls9bBVT.js";import"./supabase-BiHzSKx7.js";function F(){const{t:r,lang:t}=_(),[l,c]=d.useState({name:"",email:"",phone:"",message:"",service:""}),[b,p]=d.useState(!1),[h,u]=d.useState(!1),[g,m]=d.useState("");d.useEffect(()=>{document.title=t==="cy"?"Cysylltu â CefniTech | 07721 422537":"Contact CefniTech | Free IT Consultation | 07721 422537";const a=(n,f,x=!1)=>{const w=x?`meta[property="${n}"]`:`meta[name="${n}"]`;let o=document.querySelector(w);o||(o=document.createElement("meta"),x?o.setAttribute("property",n):o.setAttribute("name",n),document.head.appendChild(o)),o.setAttribute("content",f)},i=t==="cy"?"Cysylltwch â CefniTech am ymgynghoriad TG am ddim. Atgyweirio cyfrifiaduron, cymorth busnes, seiberddiogelwch. Ffoniwch 07721 422537.":"Contact CefniTech for a free IT consultation. Computer repairs, business IT support, cyber security. Call 07721 422537 or message us online.";a("description",i),a("robots","index, follow"),a("og:title",t==="cy"?"Cysylltu â CefniTech":"Contact CefniTech | 07721 422537",!0),a("og:description",i,!0);let s=document.querySelector("link[rel='canonical']");s||(s=document.createElement("link"),s.rel="canonical",document.head.appendChild(s)),s.href="https://cefnitech.co.uk/contact"},[t]);const y=async a=>{a.preventDefault(),u(!0),m("");try{await T("sendContactEmail",l),p(!0),c({name:"",email:"",phone:"",message:"",service:""}),window.gtag&&window.gtag("event","generate_lead",{event_category:"contact",event_label:l.service||"general"})}catch{m("Failed to send message. Please try again or call us on 07721 422537.")}u(!1)};return e.jsxs("div",{className:"bg-white dark:bg-gray-950",children:[e.jsxs("section",{className:"relative bg-gradient-to-br from-gray-900 via-gray-900 to-blue-950 overflow-hidden h-[420px] flex items-center",children:[e.jsx("div",{className:"absolute inset-0 opacity-5",style:{backgroundImage:"radial-gradient(circle at 2px 2px, white 1px, transparent 0)",backgroundSize:"32px 32px"}}),e.jsxs("div",{className:"absolute right-0 top-0 bottom-0 w-1/2 hidden md:block overflow-hidden",children:[e.jsx("img",{src:"https://images.unsplash.com/photo-1423666639041-f56000c27a9a?w=900&h=420&q=75&auto=format&fit=crop&fm=webp",alt:"Contact CefniTech IT support team",loading:"eager",fetchpriority:"high",width:"900",height:"420",className:"w-full h-full object-cover opacity-40"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-gray-900 via-gray-900/40 to-transparent"})]}),e.jsx("div",{className:"relative max-w-6xl mx-auto px-6 py-20 w-full",children:e.jsxs("div",{className:"max-w-xl",children:[e.jsx("p",{className:"text-blue-400 text-xs font-bold uppercase tracking-widest mb-4",children:r("contact_label")}),e.jsx("h1",{className:"text-4xl md:text-5xl font-black text-white tracking-tight leading-[1.1] mb-5",children:r("contact_h1")}),e.jsx("p",{className:"text-gray-400 leading-relaxed max-w-md",children:r("contact_sub")})]})})]}),e.jsx("section",{className:"py-20 dark:bg-gray-950",children:e.jsxs("div",{className:"max-w-6xl mx-auto px-6 grid md:grid-cols-2 gap-16 items-start",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-black text-gray-900 dark:text-white mb-8",children:r("contact_details")}),e.jsx("div",{className:"space-y-5 mb-10",children:[{icon:v,label:t==="cy"?"Ffôn":"Phone",value:"07721 422537",href:"tel:07721422537",track:"phone_click"},{icon:k,label:t==="cy"?"E-bost":"Email",value:"hello@cefnitech.co.uk",href:"mailto:hello@cefnitech.co.uk",track:"email_click"},{icon:j,label:t==="cy"?"Lleoliad":"Location",value:t==="cy"?"Ar draws y DU — o bell ac ar safle":"UK-wide — remote & on-site",href:null},{icon:N,label:t==="cy"?"Oriau":"Hours",value:t==="cy"?`Llun – Gwener: 8:00am – 10:00pm
Sad – Sul: 10:00am – 10:00pm`:`Mon – Fri: 8:00am – 10:00pm
Sat – Sun: 10:00am – 10:00pm`,href:null,multiline:!0}].map(a=>{const i=a.icon;return e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-11 h-11 bg-blue-50 dark:bg-blue-900/30 rounded-xl flex items-center justify-center shrink-0",children:e.jsx(i,{className:"w-5 h-5 text-blue-600 dark:text-blue-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500 font-semibold uppercase tracking-wider mb-0.5",children:a.label}),a.href?e.jsx("a",{href:a.href,onClick:()=>{base44.analytics.track({eventName:a.track||"link_click"}),window.gtag&&window.gtag("event",a.track||"link_click")},className:"text-gray-900 dark:text-gray-100 font-medium hover:text-blue-600 dark:hover:text-blue-400 transition-colors",children:a.value}):a.multiline?e.jsx("div",{className:"text-gray-900 dark:text-gray-100 font-medium",children:a.value.split(`
`).map((s,n)=>e.jsx("p",{children:s},n))}):e.jsx("p",{className:"text-gray-900 dark:text-gray-100 font-medium",children:a.value})]})]},a.label)})}),e.jsxs("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-100 dark:border-blue-800 rounded-2xl p-6 mb-8",children:[e.jsx("p",{className:"font-bold text-blue-900 dark:text-blue-200 mb-1",children:r("contact_free")}),e.jsx("p",{className:"text-blue-700 dark:text-blue-300 text-sm leading-relaxed",children:t==="cy"?"Ddim yn siwr beth sydd ei angen arnoch? Archebwch ymgynghoriad 30 munud am ddim — byddwn yn asesu eich sefyllfa ac yn argymell yr ateb gorau, heb rwymedigaeth.":"Not sure what you need? Book a free 30-minute consultation — we will assess your situation and recommend the best solution, with no obligation."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-gray-400 font-semibold uppercase tracking-wider mb-4",children:t==="cy"?"Dilynwch Ni":"Find Us Online"}),e.jsx("div",{className:"flex flex-wrap gap-3",children:[{label:"Facebook",href:"https://www.facebook.com/cefnitechsolutions/",color:"bg-blue-600",svg:e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})},{label:"Instagram",href:"https://www.instagram.com/cefnitech/",color:"bg-gradient-to-br from-purple-500 via-pink-500 to-orange-400",svg:e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"})})},{label:"WhatsApp",href:"https://wa.me/447721422537",color:"bg-green-500",svg:e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})})},{label:"Google",href:"https://g.page/r/CTn-GD2wfgyxEBM/review",color:"bg-red-500",svg:e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M12.545 10.239v3.821h5.445c-.712 2.315-2.647 3.972-5.445 3.972a6.033 6.033 0 110-12.064c1.498 0 2.866.549 3.921 1.453l2.814-2.814A9.969 9.969 0 0012.545 2C7.021 2 2.543 6.477 2.543 12s4.478 10 10.002 10c8.396 0 10.249-7.85 9.426-11.748l-9.426-.013z"})})},{label:"Messenger",href:"https://m.me/cefnitechsolutions",color:"bg-blue-500",svg:e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M12 0C5.373 0 0 4.974 0 11.111c0 3.498 1.744 6.614 4.469 8.652V24l4.088-2.242c1.092.3 2.246.464 3.443.464 6.627 0 12-4.974 12-11.111C24 4.974 18.627 0 12 0zm1.191 14.963l-3.055-3.26-5.963 3.26L10.732 8.1l3.131 3.26L19.752 8.1l-6.561 6.863z"})})},{label:"Teams",href:"https://teams.microsoft.com/l/chat/0/0?users=gethyn@cefnitech.co.uk",color:"bg-indigo-600",svg:e.jsx("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M20.625 5.482a2.879 2.879 0 100-5.758 2.879 2.879 0 000 5.758zM14.343 7.01h6.282v9.225a3.262 3.262 0 01-3.262 3.262 3.262 3.262 0 01-3.262-3.262l.242-9.225zM9.371 5.482A2.436 2.436 0 107.17 3.046a2.436 2.436 0 002.201 2.436zM4.5 7.01h9.843l-.197 9.225A4.921 4.921 0 019.35 21.07a4.921 4.921 0 01-4.85-4.835V7.01z"})})}].map(a=>e.jsx("a",{href:a.href,target:"_blank",rel:"noopener noreferrer",title:a.label,className:`${a.color} text-white w-11 h-11 rounded-xl flex items-center justify-center hover:opacity-80 transition-opacity`,children:a.svg},a.label))})]})]}),e.jsx("div",{children:b?e.jsxs("div",{className:"text-center py-16",children:[e.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-5",children:e.jsx(C,{className:"w-8 h-8 text-green-600"})}),e.jsx("h3",{className:"text-xl font-bold text-gray-900 dark:text-white mb-2",children:r("contact_sent_h")}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:r("contact_sent_p")})]}):e.jsxs(e.Fragment,{children:[g&&e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4 mb-5 text-sm text-red-700",children:g}),e.jsxs("form",{onSubmit:y,className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-2",children:r("contact_name")}),e.jsx("input",{id:"contact-name",required:!0,type:"text",placeholder:t==="cy"?"Eich enw":"Your name",value:l.name,onChange:a=>c({...l,name:a.target.value}),className:"w-full px-4 py-3 rounded-xl border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 text-sm focus:outline-none focus:border-blue-400 focus:ring-2 focus:ring-blue-100 dark:focus:ring-blue-900 transition-all placeholder-gray-400 dark:placeholder-gray-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-2",children:r("contact_phone")}),e.jsx("input",{type:"tel",placeholder:t==="cy"?"Eich rhif ffôn":"Your phone",value:l.phone,onChange:a=>c({...l,phone:a.target.value}),className:"w-full px-4 py-3 rounded-xl border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 text-sm focus:outline-none focus:border-blue-400 focus:ring-2 focus:ring-blue-100 dark:focus:ring-blue-900 transition-all placeholder-gray-400 dark:placeholder-gray-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-2",children:r("contact_email")}),e.jsx("input",{required:!0,type:"email",placeholder:t==="cy"?"Eich cyfeiriad e-bost":"Your email address",value:l.email,onChange:a=>c({...l,email:a.target.value}),className:"w-full px-4 py-3 rounded-xl border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 text-sm focus:outline-none focus:border-blue-400 focus:ring-2 focus:ring-blue-100 dark:focus:ring-blue-900 transition-all placeholder-gray-400 dark:placeholder-gray-500"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-2",children:r("contact_service")}),e.jsxs("select",{value:l.service,onChange:a=>c({...l,service:a.target.value}),className:"w-full px-4 py-3 rounded-xl border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200 text-sm focus:outline-none focus:border-blue-400 focus:ring-2 focus:ring-blue-100 dark:focus:ring-blue-900 transition-all",children:[e.jsx("option",{value:"",children:t==="cy"?"Dewiswch wasanaeth (dewisol)":"Select a service (optional)"}),e.jsx("option",{children:t==="cy"?"Atgyweirio Cyfrifiaduron":"Computer Repairs"}),e.jsx("option",{children:t==="cy"?"Cymorth TG Busnes":"Business IT Support"}),e.jsx("option",{children:t==="cy"?"Cymorth TG Cartref":"Home IT Support"}),e.jsx("option",{children:t==="cy"?"Seiberddiogelwch":"Cyber Security"}),e.jsx("option",{children:t==="cy"?"Gwasanaethau Cwmwl":"Cloud Services"}),e.jsx("option",{children:t==="cy"?"Sefydlu Rhwydwaith":"Network Setup"}),e.jsx("option",{children:t==="cy"?"Ddim yn siwr — angen cyngor":"Not sure — need advice"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider mb-2",children:r("contact_message")}),e.jsx("textarea",{required:!0,rows:5,placeholder:t==="cy"?"Dywedwch wrthym beth sy'n digwydd...":"Tell us what's going on...",value:l.message,onChange:a=>c({...l,message:a.target.value}),className:"w-full px-4 py-3 rounded-xl border border-gray-200 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 text-sm focus:outline-none focus:border-blue-400 focus:ring-2 focus:ring-blue-100 dark:focus:ring-blue-900 transition-all resize-none placeholder-gray-400 dark:placeholder-gray-500"})]}),e.jsx("button",{type:"submit",disabled:h,className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-bold py-4 rounded-full transition-all hover:shadow-lg hover:shadow-blue-200 flex items-center justify-center gap-2 disabled:opacity-70",children:h?e.jsx("span",{className:"animate-spin w-4 h-4 border-2 border-white border-t-transparent rounded-full"}):e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"w-4 h-4"}),r("contact_send")]})})]})]})})]})})]})}export{F as default};