import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { MessageSquare, ArrowRight } from "lucide-react";
import { cn } from "../../../../lib/utils";
import { sanitizeHtml, sanitizeSvg } from "../../../../lib/sanitize";
import { ParheliaAgentIcon } from "../../../ui/Icons";
export function AgentGreeting({ profile, onPromptClick, className, }) {
    const prompts = profile.prompts || [];
    return (_jsxs("div", { className: cn("agent-greeting flex h-full w-full min-w-0 flex-col items-center justify-center p-8 text-center", className), children: [_jsxs("div", { className: "animate-in fade-in slide-in-from-bottom-4 w-full min-w-0 duration-1000", children: [_jsx("div", { className: "bg-neutral-grey-5 text-neutral-grey-100 mx-auto mb-4 box-border flex size-14 items-center justify-center rounded-2xl p-3", "data-testid": "agent-greeting-icon", children: profile.svgIcon ? (_jsx("div", { className: "size-8 [&>svg]:h-full [&>svg]:w-full", dangerouslySetInnerHTML: {
                                __html: sanitizeSvg(profile.svgIcon),
                            } })) : (_jsx(ParheliaAgentIcon, { size: 32, strokeWidth: 1.5 })) }), !profile.greetingMessage ? (_jsx("h2", { className: "text-neutral-grey-100 mb-3 text-2xl font-medium tracking-tight", children: profile.agentName || profile.name })) : null, profile.greetingMessage ? (_jsx("div", { className: "agent-greeting-message prose prose-slate text-neutral-grey-100 mx-auto w-full max-w-xl font-medium tracking-tight", dangerouslySetInnerHTML: {
                            __html: sanitizeHtml(profile.greetingMessage),
                        } })) : (_jsx("p", { className: "text-neutral-grey-50 mx-auto max-w-prose text-lg leading-relaxed", children: profile.description || "How can I help you today?" }))] }), prompts.length > 0 && (_jsx("div", { className: "animate-in fade-in slide-in-from-bottom-6 mt-12 flex w-full max-w-2xl flex-wrap justify-center gap-3 duration-1000 [animation-delay:400ms]", children: prompts.map((prompt, index) => (_jsxs("button", { onClick: () => onPromptClick?.(prompt.prompt), className: "group border-border-default text-neutral-grey-100 hover:border-feedback-blue hover:text-feedback-blue flex items-center gap-3 rounded-2xl border bg-white/50 px-5 py-3 text-xs font-medium backdrop-blur-sm transition-all hover:bg-white hover:shadow-md active:scale-95", children: [_jsx(MessageSquare, { size: 16, className: "text-neutral-grey-50 group-hover:text-feedback-blue transition-colors" }), _jsx("span", { children: prompt.title }), _jsx(ArrowRight, { size: 14, className: "ml-1 -translate-x-2 opacity-0 transition-all group-hover:translate-x-0 group-hover:opacity-100" })] }, index))) }))] }));
}
//# sourceMappingURL=AgentGreeting.js.map