'use client';
import Image from 'next/image';
import { LoginForm } from './components/login-form';
import { IconButton } from '@/components/ui/button';
import { useRouter } from 'next/navigation';

export default function LoginPage() {
  const router = useRouter();

  const handleClose = () => {
    router.replace('/');
  };

  return (
    <div className="flex h-screen realoative w-screen overflow-hidden">
      <IconButton
        iconfont="icon-close"
        variant="tertiaryDark"
        size="large"
        className="absolute top-6 left-6 z-20"
        onClick={handleClose}
      />

      <div className="relative flex w-full flex-col items-center justify-center px-6">
        {/* Logo */}
        <div className="relative mb-8 h-12 sm:mb-12 sm:h-16">
          <i className="iconfont-v2 iconv2-Logo" style={{ fontSize: '50px' }} />
        </div>

        {/* 登录表单 */}
        <div className="w-full max-w-[340px]">
          <LoginForm />
        </div>
      </div>
    </div>
  );
}
