import { useState } from "react";
import SendToken from "./SendToken";
import SendUserData from "./SendUserData";

const RegisterNavyComponent = () => {
  const [otpToken, setOtpToken] = useState(false);
  const [PhoneNumber, setPhoneNumber] = useState("");
  const [nationalId, setNationalId] = useState("");
  const [navganId, setNavganId] = useState("");
  const [typeId, setTypeId] = useState("");

  if (!otpToken) {
    return (
      <SendUserData
        setOtpToken={setOtpToken}
        setPhoneNumber={setPhoneNumber}
        setNationalId={setNationalId}
        setNavganId={setNavganId}
        setTypeId={setTypeId}
        PhoneNumber={PhoneNumber}
        nationalId={nationalId}
        navganId={navganId}
      />
    );
  } else {
    return (
      <SendToken
        PhoneNumber={PhoneNumber}
        nationalId={nationalId}
        navganId={navganId}
        typeId={typeId}
        setOtpToken={setOtpToken}
      />
    );
  }
};

export default RegisterNavyComponent;
