import Box from '@mui/material/Box';
import { BackstoryPageProps } from '../components/BackstoryTab';
import { Message } from '../components/Message';
import { ChatMessage } from 'types/types';

const LoadingPage = (props: BackstoryPageProps) => {
    const preamble: ChatMessage = {
        role: 'assistant',
        type: 'text',
        status: 'done',
        sessionId: '',
        content: 'Please wait while connecting to Backstory...',
        timestamp: new Date(),
        metadata: null as any
    }

    return <Box sx={{display: "flex", flexGrow: 1, maxWidth: "1024px", margin: "0 auto"}}>
        <Message message={preamble} {...props} />
    </Box>
};

export {
  LoadingPage
};