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