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

export async function getProductPrices(
  productId: number,
  page: number = 1,
  pageSize: number = 20,
): Promise<PagedResult<ProductPrice>> {
  const res = await axiosClient.get<PagedResult<ProductPrice>>(
    `/api/v1/products/${productId}/prices`,
    { params: { page, pageSize } },
  )
  return res.data
}
