import React from "react";
import { FormInput, SubmitButton } from "../components"; 
import { Form, Link } from "react-router-dom";

const LoginPage = () => {
    return (
        <div className="flex items-center justify-center min-h-screen bg-gray-100">
            <div className="w-full max-w-md p-6 bg-white rounded-lg shadow-md">
                <h2 className="text-2xl font-semibold text-center mb-4">Please Login</h2>
                <Form method="POST" className="p-8 bg-base-100 flex flex-col gap-y-4">                    
                    <FormInput
                        label="EMAIL"
                        name="identifier"
                        type="email"
                        defaultValue=""
                    />
                    <FormInput
                        label="PASSWORD"
                        name="password"
                        type="password"
                        defaultValue=""
                    />                                       
                    <SubmitButton text="Login" />               
                </Form>
                <p className="text-center">
                    Not a member?{" "}
                    <Link to="/register" className="ml-2 link-accent">
                        Register
                    </Link>
                </p>
            </div>
            
        </div>
        
    );
};

export default LoginPage;
