text: // external imports
  const Joi = require("joi");
  
  const signupSchema = Joi.object({
    name: Joi.string().min(3).max(30).required().messages({
      "string.name": `name  is a required`,
      "any.required": `name is a required`,
      "string.empty": `name  is a required`,
    }),
    email: Joi.string().email().required().messages({
      "string.email": `provide a valid email`,
      "any.required": `email is a required`,
      "string.empty": `email is a required`,
    }),
    password: Joi.string().required().messages({
      "string.empty": "password is a required",
      "any.required": `password is a required`,
    }),
    cPassword: Joi.ref("password"),
    role: Joi.string(),
  });
  
  const loginSchema = Joi.object({
    email: Joi.string().email().required().messages({
      "string.email": `provide a valid email`,
      "any.required": `email is a required`,
      "string.empty": `email is a required`,
    }),
    password: Joi.string().required().messages({
      "string.empty": "password is a required",
      "any.required": `password is a required`,
    }),
  });
  
  const resetSchema = Joi.object({
    password: Joi.string().required().messages({
      "string.empty": "password is a required",
      "any.required": `password is a required`,
    }),
    
    cPassword: Joi.ref("password"),
  });
  
  
  module.exports = { signupSchema, loginSchema, resetSchema };
  