'use client'

import { useEffect } from 'react'
import { useRouter } from 'next/navigation'
import { useLocale } from 'next-intl'
import { Box, CircularProgress, Typography } from '@mui/material'

export default function LoginRedirectPage() {
  const router = useRouter()
  const locale = useLocale()

  useEffect(() => {
    // Redirect to the actual login page
    router.replace(`/${locale}/auth/login`)
  }, [router, locale])

  return (
    <Box
      display="flex"
      flexDirection="column"
      alignItems="center"
      justifyContent="center"
      minHeight="100vh"
      gap={2}
    >
      <CircularProgress />
      <Typography variant="body2" color="text.secondary">
        Redirecting to login...
      </Typography>
    </Box>
  )
}