import * as Yup from "yup";

export const getInitialValues = (objectToEdit: any): any => {
  // console.log(objectToEdit?.name,"objectToEdit");

  return {
    price: objectToEdit?.contact_information ?? null,
    name: objectToEdit?.name ?? null,
    exam_type_ids: objectToEdit?.address ?? null,
  };
};

export const getValidationSchema = () => {
  // validate input
  return Yup.object().shape({
    price: Yup.number()
      .required("validation.required")
      .typeError("validation.Must_be_a_number"),
    name: Yup.string().required("validation.required"),
    exam_type_ids: Yup.array().required("validation.required"),
  });
};
