module.exports=[4438,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(83086);let e=[{role:"bot",text:"Hi! How can I help you today?",delay:800},{role:"user",text:"What are your room rates?",delay:2e3},{role:"bot",text:"Standard rooms start at Rs. 8,500/night. Deluxe sea view rooms are Rs. 14,000/night. Would you like to book?",delay:2500},{role:"user",text:"Yes, for 2 nights please",delay:2e3},{role:"bot",text:"Great! I'll need your name and email to confirm the booking. Could you share those?",delay:2e3},{role:"user",text:"I'm Kasun, kasun@gmail.com",delay:1800},{role:"bot",text:"Thank you Kasun! Your booking for 2 nights (Standard Room) is confirmed. Total: Rs. 17,000. Check-in is at 2 PM. See you soon!",delay:2500}];function f(){let[a,f]=(0,c.useState)([]),[g,h]=(0,c.useState)(!1),[i,j]=(0,c.useState)("bot"),[k,l]=(0,c.useState)(0),m=(0,c.useRef)(null);return(0,c.useEffect)(()=>{if(k>=e.length){let a=setTimeout(()=>{f([]),l(0)},5e3);return()=>clearTimeout(a)}let a=e[k];h(!0),j(a.role);let b=setTimeout(()=>{h(!1),f(b=>[...b,a]),l(a=>a+1)},Math.min(a.delay,1500));return()=>clearTimeout(b)},[k]),(0,c.useEffect)(()=>{m.current&&(m.current.scrollTop=m.current.scrollHeight)},[a,g]),(0,b.jsx)("div",{className:"w-full max-w-md",children:(0,b.jsx)("div",{className:"rounded-2xl border border-[var(--color-border-subtle)] bg-white p-1 shadow-card",children:(0,b.jsxs)("div",{className:"rounded-xl bg-[var(--color-bg-soft)] p-5",children:[(0,b.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[(0,b.jsx)(d.AyoMascot,{variant:"mini"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-sm font-semibold",children:"AEye Assistant"}),(0,b.jsx)("p",{className:"text-xs text-[#1A9B5A]",children:"Online"})]}),(0,b.jsx)("div",{className:"ml-auto flex gap-1",children:(0,b.jsx)("span",{className:"h-2 w-2 rounded-full bg-[#67FFA1] animate-pulse"})})]}),(0,b.jsxs)("div",{ref:m,className:"space-y-3 overflow-y-auto",style:{minHeight:"240px",maxHeight:"280px"},children:[a.map((a,c)=>(0,b.jsx)("div",{className:`flex ${"user"===a.role?"justify-end":"justify-start"} animate-[fadeSlideIn_0.3s_ease-out]`,children:(0,b.jsx)("div",{className:`max-w-[85%] rounded-2xl px-4 py-2.5 text-sm leading-relaxed ${"user"===a.role?"rounded-tr-md bg-[var(--color-bg-brand)] text-white":"rounded-tl-md bg-white shadow-sm"}`,children:a.text})},c)),g&&(0,b.jsx)("div",{className:`flex ${"user"===i?"justify-end":"justify-start"}`,children:(0,b.jsxs)("div",{className:`flex items-center gap-1.5 rounded-2xl px-4 py-3 ${"user"===i?"rounded-tr-md bg-[#003d47]":"rounded-tl-md bg-white shadow-sm"}`,children:[(0,b.jsx)("span",{className:"h-2 w-2 rounded-full animate-bounce",style:{animationDelay:"0ms",backgroundColor:"user"===i?"rgba(255,255,255,0.7)":"#9ca3af"}}),(0,b.jsx)("span",{className:"h-2 w-2 rounded-full animate-bounce",style:{animationDelay:"150ms",backgroundColor:"user"===i?"rgba(255,255,255,0.7)":"#9ca3af"}}),(0,b.jsx)("span",{className:"h-2 w-2 rounded-full animate-bounce",style:{animationDelay:"300ms",backgroundColor:"user"===i?"rgba(255,255,255,0.7)":"#9ca3af"}})]})})]}),(0,b.jsxs)("div",{className:"mt-4 flex gap-2",children:[(0,b.jsx)("div",{className:"flex-1 rounded-xl border border-[var(--color-border-subtle)] bg-white px-4 py-2.5 text-sm text-[var(--color-text-secondary)]",children:"Type a message..."}),(0,b.jsx)("button",{className:"rounded-xl bg-[var(--color-bg-brand)] px-4 py-2.5 text-white transition hover:bg-[var(--color-bg-brand-light)]",children:(0,b.jsx)("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5"})})})]})]})})})}a.s(["LiveChatPreview",()=>f])}];

//# sourceMappingURL=src_components_live-chat-preview_tsx_50da0a15._.js.map