import { PageContainer } from '@ant-design/pro-components';
import { useModel } from '@umijs/max';
import { Flex, theme } from 'antd';
import React, { useState } from 'react';
import './Welcome.less'
import HeaderModelSelect from '@/components/Custom/HeaderModelSelect';
import type { ModelItem } from '@/components/Custom/HeaderModelSelect';
import InputBar from '@/components/Custom/InputBar';

const Welcome: React.FC = () => {
  const { token } = theme.useToken();
  const { initialState } = useModel('@@initialState');
  const [model, setModel] = useState<ModelItem | undefined>(undefined);

  return (
    <PageContainer title={<HeaderModelSelect value={model} onChange={e => setModel(e)}/>} className='WelcomePage'>
      <Flex align='center' justify='center' vertical>
        <div className='PageHeader'></div>
        <InputBar onSubmit={e => {
          console.log(e);
        }}/>
      </Flex>
    </PageContainer>
  );
};

export default Welcome;
