'use client';

import { createLazyComponent, LoadingFallback } from '../../components/lazy-wrapper';
import type { ChatRootProps } from './components/ChatRoot';

export const LazyChat = createLazyComponent<ChatRootProps>(
  () => import('./components/ChatRoot').then((m) => ({ default: m.ChatRoot })),
  {
    displayName: 'LazyChat',
    fallback: <LoadingFallback minHeight={320} text="Loading chat…" />,
  },
);

export type { ChatRootProps };
