import { IBaseResponse } from '@/@core/types/api'
import { useCustomMutation } from '@/hooks/api'
import { request } from '@/utils'
import { PASSWORD_URL } from '.'
/* import { ISendEmail } from '@/types/data/password'
 */ import { useParams } from 'next/navigation'

export const CREATE_PLAN_QUERY_KEY = 'send-email'

export const useSendEmail = () => {
  const createPlanMutation = useCustomMutation<any, IBaseResponse<any>>(
    [CREATE_PLAN_QUERY_KEY],
    data => {
      return request<IBaseResponse<any>, any>({
        url: `${[...PASSWORD_URL]}`,
        method: 'POST',
        data
      })
    },
    {
      toastMessageType: 'promise'
    }
  )

  return createPlanMutation
}
