// Next Imports
import type { Metadata } from 'next'
import { getTranslations } from 'next-intl/server'

// Component Imports
import Login from '@views/Login'

// Server Action Imports
import { getServerMode } from '@core/utils/serverHelpers'

export async function generateMetadata(): Promise<Metadata> {
  const t = await getTranslations('login')

  return {
    title: t('title'),
    description: t('description')
  }
}

const LoginPage = async () => {
  // Vars
  const mode = await getServerMode()

  return <Login mode={mode} />
}

export default LoginPage
