import {useApi} from '@common/api/useApi';
import {z} from 'zod';

// 重置密码
const useResetPassword = (
  phone: string, // 手机号
  verifyCode: string, // 验证码
  password: string, // 密码
) => {
  return useApi(
    '/am/v3/userCenter/account/resetPwd',
    'POSTJSON',
    {
      phoneNum: phone,
      newPwd: password,
      confirmPwd: password,
      verifyCode: verifyCode,
    },
    z.unknown(),
    {},
  );
};

export {useResetPassword};
