import { RouteProvider } from '@/hooks/useRoute'
import ResponsiveContainer from '@/layout/ResponsiveContainer'
import LoadingProvider from '@/plugins/LoadingContext'
import I18nProvider from '@/plugins/i18nContext'
import '@/styles/globals.css'
import type { AppProps } from 'next/app'
import Head from 'next/head'
import 'vComponents/styles/generated/output.css'
import 'vComponents/styles/generated/bgColors.min.css'

import { ToastContainer } from 'react-toastify'

export default function App ({ Component, pageProps }: AppProps) {
  return (
    <>
      <Head>
        <link rel="icon" href="https://wiki.via-asesores.com/logo-orbis_min.png" type="image/x-icon" />
        <title>Orbis Template</title>
      </Head>

      <I18nProvider locale={'es'} dict={''}>
        <LoadingProvider>
          <ToastContainer />
          <ResponsiveContainer>
            <RouteProvider>
              <Component {...pageProps} />
            </RouteProvider>
          </ResponsiveContainer>
        </LoadingProvider>
      </I18nProvider>
    </>
  )
}
