import { ArrowUpRightIcon } from 'lucide-react' import { lazy, Suspense } from 'react' import { AiIconAnimation, Card, CardContent, CardDescription, CardHeader, CardTitle, cn, Skeleton, } from 'ui' import type { SubmittedSupportRequest } from './SupportForm.state' import { NO_PROJECT_MARKER } from './SupportForm.utils' interface SupportAssistantSuccessCardProps { request: SubmittedSupportRequest className?: string } const SupportAssistantSuccessCardContent = lazy(() => import('@/components/ui/AIAssistantPanel/AIAssistant').then((mod) => ({ default: mod.SupportAssistantSuccessCardContent, })) ) function hasProjectScopedAssistantContext(projectRef: string | undefined) { return projectRef !== undefined && projectRef !== NO_PROJECT_MARKER } export function SupportAssistantSuccessCard(props: SupportAssistantSuccessCardProps) { if (!hasProjectScopedAssistantContext(props.request.projectRef)) return null return ( }> ) } function SupportAssistantSuccessCardLoadingShell({ className }: { className?: string }) { return (
While you wait Assistant may be able to help
) } function SupportAssistantResponseLoadingSkeleton() { return (
) }