import { Activity, Bot, Boxes, Building2, Cpu, Database, Factory, Hexagon, Network, Server, SquareTerminal, Users } from "lucide-react"; import { useState } from "react"; import { useNavigate } from "react-router-dom"; import { setAuthToken, signIn } from "../lib/auth-client"; function VtitIcon() { return ( ); } export function AuthPage() { const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const [name, setName] = useState(""); const [error, setError] = useState(null); const [notice, setNotice] = useState(null); const [loading, setLoading] = useState(false); const navigate = useNavigate(); async function handleSubmit(e: React.FormEvent) { e.preventDefault(); setError(null); setNotice(null); setLoading(true); const onSuccess = (ctx: any) => { const token = ctx.response.headers.get("set-auth-token"); if (token) setAuthToken(token); }; const { error } = await signIn.email({ email, password, callbackURL: "/" }, { onSuccess }); setLoading(false); if (error) { setError(error.message || "Sign in failed"); return; } navigate("/"); } return (
{/* Sci-fi Background elements */}
{/* Animated glowing orbs */}
{/* Floating Tech Icons - Layer 1 (Background, small) */}
{/* MES */}
{/* HRM */}
{/* Floating Tech Icons - Layer 2 (Midground, various sizes) */}
{/* Chatbot */}
{/* Floating Tech Icons - Layer 3 (Foreground, highly visible) */}
{/* Blockchain */}
{/* ERP */}
{/* Support/Chat */}
{/* Grid pattern */}
{/* Scanning line effect */}
{/* Glassmorphism Login Modal */}
{/* Logo Section */}
VTIT Logo

VTIT Coding Assistant

Or
{/* Footer Text */}

Phát triển bởi P. Công Nghệ Sản Phẩm - TTCN

); } function AuthForm(props: { email: string; password: string; name: string; error: string | null; notice: string | null; loading: boolean; onEmailChange: (value: string) => void; onPasswordChange: (value: string) => void; onNameChange: (value: string) => void; onSubmit: (e: React.FormEvent) => void; }) { const inputClass = "w-full bg-[#030712]/50 border border-white/10 rounded-lg px-4 py-3 text-sm text-white placeholder-zinc-500 outline-none focus:border-accent focus:shadow-[0_0_15px_rgba(8,145,178,0.3)] transition-all"; return (
props.onEmailChange(e.target.value)} required className={inputClass} /> props.onPasswordChange(e.target.value)} required minLength={8} className={inputClass} /> {props.error &&

{props.error}

} {props.notice &&

{props.notice}

}
); }