import { IS_PLATFORM } from 'common' import { X } from 'lucide-react' import Image from 'next/image' import { useRouter } from 'next/router' import SVG from 'react-inlinesvg' import { Button, cn, Separator } from 'ui' import styleHandler from 'ui/src/lib/theme/styleHandler' import { ASSISTANT_SUGGESTIONS } from './HelpPanel.constants' import { HelpSection } from './HelpSection' import type { SupportFormUrlKeys } from '@/components/interfaces/Support/SupportForm.utils' import { SIDEBAR_KEYS } from '@/components/layouts/ProjectLayout/LayoutSidebar/LayoutSidebarProvider' import { ButtonTooltip } from '@/components/ui/ButtonTooltip' import { useAiAssistantStateSnapshot } from '@/state/ai-assistant-state' import { useSidebarManagerSnapshot } from '@/state/sidebar-manager-state' export const HelpPanel = ({ onClose, projectRef, supportLinkQueryParams, }: { onClose: () => void projectRef: string | undefined supportLinkQueryParams: Partial | undefined }) => { const snap = useAiAssistantStateSnapshot() const { openSidebar, closeSidebar } = useSidebarManagerSnapshot() const router = useRouter() const __styles = styleHandler('popover') return (
Help & Support closeSidebar(SIDEBAR_KEYS.HELP_PANEL)} icon={} tooltip={{ content: { side: 'bottom', text: 'Close' } }} />
{ onClose() openSidebar(SIDEBAR_KEYS.AI_ASSISTANT) snap.newChat(ASSISTANT_SUGGESTIONS) }} onSupportClick={onClose} />
Community support

Our Discord community can help with code-related issues. Many questions are answered in minutes.

) }