import { createApiModule, post } from '@/core/http/http-client'
import { buildRestPath } from '@/core/config/api-paths'

/** 业务 REST 接口（在此扩展 path 即可） */
export const business = createApiModule({
	productGoods: { path: buildRestPath('product/goods'), method: 'GET' },
	productCollect: { path: buildRestPath('product/collect'), method: 'GET' },
	couponQuery: { path: buildRestPath('coupon/query'), method: 'POST' },
	couponReceive: { path: buildRestPath('coupon/receive'), method: 'POST' }
})

export function sendChatMessage(data) {
	return post(buildRestPath('chat/send'), data)
}
