"use client";
import LoginForm from "@/components/forms/login/LoginForm";
import {useUserLogin} from "@/hooks";
import {useRouter} from "next/navigation";
import React from "react";

export default function Page() {
  const router = useRouter();
  const {mutateAsync, isPending} = useUserLogin();
  return (
    <div className="flex flex-col items-center justify-center h-screen">
      <div className="rounded-lg overflow-hidden min-w-[400px]">
        <div className="bg-neutral-200 text-black font-medium p-4 text-center">
          فرم ورود
        </div>
        <LoginForm
          router={router}
          loginFn={mutateAsync}
          loginPending={isPending}
        />
      </div>
    </div>
  );
}
