import {useState} from "react";
import { RequestStatus } from "../../core/models";
import EmployerValidation from "./EmployerValidation";

const StartValidation = () => {

  const [requestStatus, setRequestStatus] = useState<RequestStatus>({loading:false, status:null, message:'', data:{}})

  return (
    <>
    {requestStatus.status ?
      <div className={`w-full overflow-y-auto bg-top bg-cover`}>
        <div className="w-full flex justify-center">
          <div className="w-full md:max-w-[570px]">
            <div className="bg-white w-full rounded-2xl border-2 border-black">
              <div className="w-full p-5 sm:p-10 lg:p-20 flex flex-col justify-between items-center h-full">
                <p className="text-xl mb-4 text-center font-medium text-red-500 dark:text-black">
                  Thank you for completing the process, we will continue further processing with the information provided
                </p>
              </div>
            </div>
          </div>
        </div>
      </div>
      :
      <div className="my-10 bg-white w-full rounded-2xl border-2 border-black">
        <div className="w-full p-5 sm:p-10 lg:p-20">
          <EmployerValidation requestStatus={requestStatus} setRequestStatus={setRequestStatus} />
        </div>
      </div>
    }
    </>
  );
};

export default StartValidation;
