import Container from '@/components/shared/Container'
import DoubleSidedImage from '@/components/shared/DoubleSidedImage'
import { Button } from '@/components/ui'
import { useLocalization } from '@/utils/hooks/useLocalization'
import { MdArrowBack } from 'react-icons/md'
import { useNavigate } from 'react-router-dom'

const AccessDenied = () => {
  const navigate = useNavigate()
  const { translate } = useLocalization()

  return (
    <Container className="h-full">
      <div className="h-full flex flex-col items-center justify-center">
        <DoubleSidedImage
          src="/img/others/img-2.png"
          darkModeSrc="/img/others/img-2-dark.png"
          alt={ translate('::AccessDenied')}
        />
        <div className="mt-6 text-center">
          <h3 className="mb-2">{ translate('::AccessDenied')}</h3>
          <p className="text-base">{ translate('::AccessDeniedMessage')}</p>
        </div>
        <Button size="xs" className="mt-2" variant="default" onClick={() => navigate(-2)}>
          <MdArrowBack />
        </Button>
      </div>
    </Container>
  )
}

export default AccessDenied
