import { IBaseResponse } from '@/@core/types/api'
import { useCustomMutation } from '@/hooks/api'
import { request } from '@/utils'
import { SEND_PASS_URL } from '.'

export const SEND_CODE_QUERY_LAST = 'send-password-final'

export const useSendPassword = () => {
  const createPlanMutation = useCustomMutation<any, IBaseResponse<any>>([SEND_CODE_QUERY_LAST], data => {
    return request<IBaseResponse<any>, any>({
      url: `${[...SEND_PASS_URL]}`,
      method: 'POST',
      data
    })
  })

  return createPlanMutation
}
