import { ArrowRightIcon, BotIcon } from 'lucide-react'; import { useState } from 'react'; import { AICourseFollowUpPopover, type AIChatHistoryType, } from './AICourseFollowUpPopover'; import { UpgradeAccountModal } from '../Billing/UpgradeAccountModal'; type AICourseFollowUpProps = { courseSlug: string; moduleTitle: string; lessonTitle: string; }; export function AICourseFollowUp(props: AICourseFollowUpProps) { const { courseSlug, moduleTitle, lessonTitle } = props; const [isOpen, setIsOpen] = useState(false); const [showUpgradeModal, setShowUpgradeModal] = useState(false); const [courseAIChatHistory, setCourseAIChatHistory] = useState< AIChatHistoryType[] >([ { role: 'assistant', content: 'Hey, I am your AI instructor. Here are some examples of what you can ask me about 🤖', isDefault: true, }, ]); return (
{showUpgradeModal && ( setShowUpgradeModal(false)} /> )} {isOpen && ( { setIsOpen(false); setShowUpgradeModal(true); }} onOutsideClick={() => { if (!isOpen) { return; } setIsOpen(false); }} /> )} {isOpen && (
)}
); }