import React from 'react'; import Image from 'next/image'; interface ChatBubbleProps { author?: string; avatar?: string; role?: string; children: React.ReactNode; align?: 'left' | 'right'; } export default function ChatBubble({ author = 'KLZ Team', avatar = '/uploads/2024/11/cropped-favicon-3-192x192.png', // Default fallback role = 'Assistant', children, align = 'left', }: ChatBubbleProps) { const isRight = align === 'right'; return (
{/* Avatar */}
{/* Use a simple div placeholder if image fails or isn't provided, but here we assume a path */}
{author.charAt(0)}
{avatar && ( {author} )}
{/* Message Bubble */}
{author} {role && {role}}
{children}
{/* Industrial accent dot */}
); }