import * as Yup from "yup";

export const getInitialValues = (objectToEdit: any): any => {
   console.log(objectToEdit,"objectToEdit");
   
  return {
    id: objectToEdit?.id ?? null,
    name: objectToEdit?.name ?? null,
    unit_id: objectToEdit?.term ?? null,
  };
};

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