import React from "react";
import BasicInfo from "./BasicInfo";
import YourAreAlmostThere from "./YourAreAlmostThere";
import LoanAmountComp from "./LoanAmountComp";
import ApplicantsAttestation from "./ApplicantsAttestation";

const GetStarted = ({handleNextStep, step}:{handleNextStep:any, step:string|number|any}) => {
  // const [step, setStep] = React.useState(1);

  // const handleNextStep = () => {
  //   if (step < 5) {
  //     setStep(step + 1);
  //   }
  // };

  // const handlePreviousStep: React.MouseEvent<HTMLButtonElement> = () => {
  //   setStep(step - 1);
  // };

  const [inputValues, setInputValues] = React.useState({
    title: "",
    marital: "",
    agentId: "",
    bvn: "",
    firstName: "",
    phone: "",
    email: "",
    surname: "",
    dob: "",
    secondName: "",
    spouseBVN: "",
  });

  return (
    <div className="w-full flex items-center justify-center">
      <div className="containerMode">
        {/* Main */}
        <main>
          {step === 2 && (
            <BasicInfo
              inputValues={inputValues}
              setInputValues={setInputValues}
              handleNextStep={handleNextStep}
            />
          )}
          {step === 3 && <YourAreAlmostThere handleNextStep={handleNextStep} />}
          {step === 4 && <LoanAmountComp handleNextStep={handleNextStep} />}
          {step === 5 && <ApplicantsAttestation />}
        </main>
      </div>
    </div>
  );
};

export default GetStarted;
