import { axiosClient } from '@/api/axiosClient'
import type { ListProductTypesParams, PagedResult, ProductTypeListItem } from '../types'

export async function listProductTypes(
  params?: ListProductTypesParams,
): Promise<PagedResult<ProductTypeListItem>> {
  const response = await axiosClient.get<PagedResult<ProductTypeListItem>>(
    '/api/v1/product-types',
    { params },
  )
  return response.data
}
