1import{u as S,t as D,r as x,j as e,S as k,a as A,N as E,c as T,v as B,w as p,P as I,F as U,b as R,O as b,T as O,K as L,V as P,x as g,y as f,z as $}from"./index-CzMEFmtw.js";const w="Healthserve Consultation",j="A 15-minute call with a Healthserve specialist about your UAE healthcare goals. Our team will reach out on WhatsApp shortly to confirm the slot.",v="WhatsApp / Phone Call";function N(){const o=new Date,s=new Date(o);for(s.setDate(s.getDate()+1);s.getDay()===5||s.getDay()===6;)s.setDate(s.getDate()+1);const n=new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate(),6,0,0)),i=new Date(n.getTime()+15*60*1e3);return{start:n,end:i}}const u=o=>o.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,"");function F(){const{start:o,end:s}=N();return`https://calendar.google.com/calendar/render?${new URLSearchParams({action:"TEMPLATE",text:w,dates:`${u(o)}/${u(s)}`,details:j,location:v}).toString()}`}function G(){const{start:o,end:s}=N(),i=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//Healthserve//Consultation//EN","CALSCALE:GREGORIAN","METHOD:PUBLISH","BEGIN:VEVENT",`UID:${`healthserve-${o.getTime()}@healthserve.ae`}`,`DTSTAMP:${u(new Date)}`,`DTSTART:${u(o)}`,`DTEND:${u(s)}`,`SUMMARY:${w}`,`DESCRIPTION:${j}`,`LOCATION:${v}`,"END:VEVENT","END:VCALENDAR"].join(`\r 2`),c=new Blob([i],{type:"text/calendar;charset=utf-8"}),t=URL.createObjectURL(c),l=document.createElement("a");l.href=t,l.download="healthserve-consultation.ics",document.body.appendChild(l),l.click(),document.body.removeChild(l),setTimeout(()=>URL.revokeObjectURL(t),1e3)}const V=[{icon:b,label:"UAE Licensing",value:"licensing"},{icon:O,label:"German Nursing",value:"german"},{icon:L,label:"Clinical Training",value:"training"},{icon:b,label:"Facility Setup",value:"facility"},{icon:P,label:"Career Guidance",value:"career"}],Y=()=>{const{ref:o,isInView:s}=S(.1),n=D("book_consultation"),[i,c]=x.useState(1),[t,l]=x.useState({name:"",email:"",whatsapp:"",country:"",goals:[],profession:"",experience:"",status:""}),[m,h]=x.useState(!1),y=a=>{l(r=>({...r,goals:r.goals.includes(a)?r.goals.filter(d=>d!==a):[...r.goals,a]}))},C=async()=>{if(!p(t)){g({title:"Missing info",description:"Please fill in your name, email and WhatsApp number.",variant:"destructive"});return}h(!0);const a=crypto.randomUUID(),{error:r}=await f.from("consultation_requests").insert({id:a,name:t.name,email:t.email,whatsapp:t.whatsapp||null,country:t.country||null,goals:t.goals,profession:t.profession||null,experience:t.experience||null,status:t.status||null});if(r){console.error(r),g({title:"Something went wrong",description:"Please try again or WhatsApp us directly.",variant:"destructive"}),h(!1);return}f.functions.invoke("send-transactional-email",{body:{templateName:"consultation-lead-notification",recipientEmail:"[email protected]",idempotencyKey:`consultation-${a}`,templateData:{...t,id:a}}}).catch(()=>{}),$("ConsultationRequests",[new Date().toISOString(),t.name,t.email,t.whatsapp,t.country||"",t.goals.join(", "),t.profession||"",t.experience||"",t.status||"","BookConsultation"]).catch(d=>console.warn("Sheet mirror failed (lead already saved):",d)),h(!1),c(4)};return e.jsxs(e.Fragment,{children:[e.jsx(k,{title:"Book Your Consultation â Healthserve",description:"Schedule a one-on-one call with a UAE healthcare licensing advisor. No-obligation guidance on your next career step.",path:"/book-consultation"}),e.jsxs("div",{className:"dark",children:[e.jsx(A,{}),e.jsx(E,{}),e.jsx("main",{children:e.jsxs("section",{ref:o,className:"relative pt-28 pb-20 md:pt-36 md:pb-28 bg-hero-gradient overflow-hidden noise-overlay min-h-screen flex items-center",children:[e.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:e.jsx("div",{className:"absolute w-[500px] h-[500px] rounded-full opacity-[0.10] blur-[100px] top-[-10%] left-[-10%]",style:{background:"#F9A01B",animation:"float-orb 20s ease-in-out infinite"}})}),e.jsxs("div",{className:`relative z-10 w-full max-w-[680px] mx-auto px-6 ${s?"animate-fade-up":"opacity-0"}`,children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsxs("h1",{className:"font-display font-extrabold text-white text-3xl md:text-4xl mb-3",children:["Book Your ",e.jsx("span",{className:"text-gradient-orange",children:"Healthcare Consultation"})]}),e.jsx("p",{className:"text-white/80 text-base",children:"No fees. No commitments. Just expert guidance tailored to your situation."}),e.jsx("div",{className:"flex flex-wrap justify-center gap-4 mt-4",children:["Confidential","Expert Advisor","15-Minute Call"].map(a=>e.jsxs("span",{className:"text-white/75 text-xs flex items-center gap-1",children:[e.jsx(T,{size:12,className:"text-[#25D366]"})," ",a]},a))})]}),e.jsx("div",{className:"h-1 rounded-full bg-white/[0.06] mb-8 overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${i/4*100}%`,background:"linear-gradient(90deg, #F9A01B, #f7c56a)"}})}),e.jsxs("div",{className:"glass-card p-6 md:p-8",children:[i===1&&e.jsxs("div",{className:"space-y-5",children:[e.jsx("h3",{className:"text-white font-display font-semibold text-lg",children:"Step 1 â Your Goal"}),e.jsx("p",{className:"text-white/75 text-sm",children:"What are you looking for? (Select all that apply)"}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:V.map(a=>{const r=a.icon,d=t.goals.includes(a.value);return e.jsxs("button",{onClick:()=>
2y(a.value),className:`glass-card p-4 text-center transition-all ${d?"border-[#F9A01B]/50 bg-[#F9A01B]/5":"hover:border-white/20"}`,children:[e.jsx(r,{size:24,className:`mx-auto mb-2 ${d?"text-[#F9A01B]":"text-white/75"}`}),e.jsx("p",{className:`text-sm font-semibold ${d?"text-[#F9A01B]":"text-white/85"}`,children:a.label})]},a.value)})}),e.jsx("button",{onClick:()=>c(2),disabled:t.goals.length===0,className:"btn-primary-hs w-full disabled:opacity-50",children:"Continue â"})]}),i===2&&e.jsxs("div",{className:"space-y-5",children:[e.jsx("h3",{className:"text-white font-display font-semibold text-lg",children:"Step 2 â Your Profile"}),e.jsxs("div",{children:[e.jsx("label",{className:"text-white/75 text-xs mb-1.5 block",children:n.label("profession","Profession")}),e.jsxs("select",{value:t.profession,onChange:a=>l({...t,profession:a.target.value}),className:"w-full h-14 px-4 rounded-xl bg-white/[0.04] border border-white/[0.12] text-white text-sm outline-none appearance-none",children:[e.jsx("option",{value:"",children:"Select..."}),n.options("profession",["Nurse","Doctor","Pharmacist","Dentist","Lab Technician","Physiotherapist","Other"]).map(a=>e.jsx("option",{value:a,children:a},a))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-white/75 text-xs mb-1.5 block",children:n.label("experience","Years of Experience")}),e.jsx("input",{type:"number",min:"0",max:"30",value:t.experience,onChange:a=>l({...t,experience:a.target.value}),className:"w-full h-14 px-4 rounded-xl bg-white/[0.04] border border-white/[0.12] text-white text-sm outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-white/75 text-xs mb-1.5 block",children:n.label("status","Current Status")}),e.jsxs("select",{value:t.status,onChange:a=>l({...t,status:a.target.value}),className:"w-full h-14 px-4 rounded-xl bg-white/[0.04] border border-white/[0.12] text-white text-sm outline-none appearance-none",children:[e.jsx("option",{value:"",children:"Select..."}),n.options("status",["Student","Working in home country","Currently in UAE","Relocating to UAE","Other"]).map(a=>e.jsx("option",{value:a,children:a},a))]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-white/75 text-xs mb-1.5 block",children:n.label("country","Your Country")}),e.jsx("input",{type:"text",value:t.country,onChange:a=>l({...t,country:a.target.value}),className:"w-full h-14 px-4 rounded-xl bg-white/[0.04] border border-white/[0.12] text-white text-sm outline-none"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>c(1),className:"btn-ghost-hs flex-1",children:"â Back"}),e.jsx("button",{onClick:()=>c(3),className:"btn-primary-hs flex-1",children:"Continue â"})]})]}),i===3&&e.jsxs("div",{className:"space-y-5",children:[e.jsx("h3",{className:"text-white font-display font-semibold text-lg",children:"Step 3 â Your Contact Details"}),e.jsx("p",{className:"text-white/75 text-sm",children:"Required so our specialist can reach you within 1 hour."}),e.jsx(B,{theme:"dark",value:{name:t.name,email:t.email,whatsapp:t.whatsapp},onChange:a=>l({...t,...a})}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>c(2),className:"btn-ghost-hs flex-1",children:"â Back"}),e.jsx("button",{onClick:C,disabled:m||!p(t),className:"btn-primary-hs flex-1 disabled:opacity-50",children:m?"Booking...":n.submitLabel("Book My Consultation â")})]})]}),i===4&&e.jsx(I,{formType:"consultation",answers:{name:t.name,email:t.email,whatsapp:t.whatsapp,country:t.country,goals:t.goals,profession:t.profession,experience:t.experience,status:t.status},theme:"dark"}),i===4&&e.jsxs("div",{className:"mt-5 flex flex-col sm:flex-row gap-3 justify-center",children:[e.jsx("a",{href:F(),target:"_blank",rel:"noopener noreferrer",className:"btn-ghost-hs text-sm",children:"Add to Google Calendar"}),e.jsx("button",{onClick:G,className:"btn-ghost-hs text-sm",children:"Add to Apple Calendar"})]})]})]})]})}),e.jsx(U,{}),e.jsx(R,{})]})]})};export{Y 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.