'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 useUpdateLogo = () => {
  return useCustomMutation<FormData, IBaseResponse<IEntityProfile>>(
    ['profile-update-logo'],
    async payload => {
      const res = await request({
        url: '/entity/update-logo',
        method: 'POST',
        data: payload
      })
      return res.data
    }
  )
}
