"use client"
import {withFormik} from "formik";
import {AppRouterInstance} from "next/dist/shared/lib/app-router-context.shared-runtime";
import InnerCreateOnlineCaseForm from "./InnerCreateOnlineCaseForm";
import {CreatePatientFormValues} from "../../patients/edit/UpdatePatientForm";
import { CreatePatientFormProps } from "../../patients/new/CreatePatientForm";

enum CaseStatus {
  NEW,
  CONTACTED,
  DOCS_PENDING,
  REVIEWING,
  PRE_APPROVED,
  REJECTED,
  CLOSED,
  CONVERTED_TO_HIS,
}

export interface CreateOnlineCaseFormProps {
  router: AppRouterInstance;
  // patients?:any
}
export interface CreateOnlineCaseFormValues {
  message?: string;
  specialty?: string;

  status?: CaseStatus;
}

const CreateOnlineCaseForm = withFormik<
  CreateOnlineCaseFormProps & CreatePatientFormProps,
  CreatePatientFormValues & CreateOnlineCaseFormValues
>({
  mapPropsToValues: () => ({
    firstName: "",
    lastName: "",
    email: "",
    sex: "male",
    address: "",
    age: null,
    birthDate: "",
    nationality: "",
    nationalityCode: "",
    passportCode: "",
    postalCode: "",
    phone: "",
    specialty: "",
    preferredLanguage: "",
    status: CaseStatus.NEW,
    message: "",
  }),
  handleSubmit: async (values, {props}) => {},
})(InnerCreateOnlineCaseForm);

export default CreateOnlineCaseForm;
