import { API_ENDPOINTS, requestPost } from './index.js';

export const placeBid = ({ bidAmount, bidderId, eventId, itemId, maxAmount }, auth) => {
    const requestOptions = { Authorization: auth ? `Bearer ${auth}` : null };
    return requestPost({
        path: `${API_ENDPOINTS.PLACE_BID}/${itemId}`,
        body: { bidAmount, bidderId, eventId, maxAmount },
        requestOptions,
    });
};
