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

// 修改手机号
const useChangePhone = (
  username: string,
  idCardNumber: string,
  phone: string,
  smsCode: string,
) => {
  return useApi(
    '/am/v3/userCenter/account/changeAccountByUnlogin',
    'POSTJSON',
    {
      userName: username,
      userIdCardNum: idCardNumber,
      phoneNum: phone,
      verifyCode: smsCode,
    },
    z.unknown(),
    {},
  );
};

export {useChangePhone};
