'use client'

import { request } from '@/utils'
import { IBaseResponse } from '@/@core/types/api'
import { IEntityProfile } from '@/types/data/profile/profile.interface'
import { useCustomMutation } from '@/hooks/api'

export const useUpdateBasicInfo = () => {
  return useCustomMutation<Partial<IEntityProfile>, IBaseResponse<IEntityProfile>>(
    ['profile-update-basic-info'],
    async payload => {
      const res = await request({
        url: '/entity/update-basic-info',
        method: 'POST',
        data: payload
      })
      return res.data
    }
  )
}
