import { axiosClient } from '@/api/axiosClient'
import type { UpdateProductTypeRequest, ProductTypeDetail } from '../types'

export async function updateProductType(
  id: number,
  payload: UpdateProductTypeRequest,
): Promise<ProductTypeDetail> {
  const response = await axiosClient.put<ProductTypeDetail>(
    `/api/v1/admin/product-types/${id}`,
    payload,
  )
  return response.data
}
