// External dependencies import Image from "next/image"; import { MessageSquareShare } from "lucide-react"; // Internal UI components import { Card, CardContent } from "@/components/ui/card"; import { ChatBot } from "@/app/(audiences)/for-students/data/chatbots"; // Component props interface interface ChatBotCardProps { chatbot: ChatBot; } /** * ChatBotCard - A responsive card component that displays chatbot information * Features: * - Optimized image loading with WebP support and PNG fallback * - Hover animations and transitions * - Gradient text effects * - Decorative corner accent */ export default function ChatBotCard({ chatbot }: ChatBotCardProps) { // Extract base name from icon path for use in both WebP and PNG sources const baseIconName = chatbot.icon.split(".")[0]; return ( {/* Avatar section with modern image format optimization */}
{/* WebP format for modern browsers */} {/* PNG fallback for older browsers */} {chatbot.title}
{/* Main content section with flex layout for dynamic spacing */}
{/* Title with gradient text effect and hover animation */}

{chatbot.title}

{/* Description with line clamping for consistent card heights */}

{chatbot.description}

{/* Interactive chat button with hover and active states */}
{/* Decorative gradient corner accent with hover animation */}
); }