import { Helmet } from 'react-helmet-async'
import Router from '@/router/index'
import Logo from '@/assets/images/logo.png'
import { AntdAdapter } from './theme/adapter/antd.adapter'
import { ThemeProvider } from './theme/theme-provider'
import { MotionLazy } from './components/animate/motion-lazy'
import Toast from './components/toast'

const { VITE_APP_TITLE: APPTITLE } = import.meta.env

function App() {
  return (
    <ThemeProvider adapters={[AntdAdapter]}>
      <MotionLazy>
        <Helmet>
          <title>{APPTITLE}</title>
          <link rel='icon' href={Logo} />
        </Helmet>
        <Toast />
        <Router />
      </MotionLazy>
    </ThemeProvider>
  )
}

export default App
