import { apiShopeeSeller } from '@/api/shopee/seller/init';

/**
 *
 * @param {number} orderId
 * @param {string} comment
 * @param {number} rating
 * @returns
 */
export const ratingOrderCompleted = async (orderId, comment, rating = 5) => {
  const payload = {
    order_id: orderId,
    rate_star: rating,
    rate_comment: comment,
  };

  const result = apiShopeeSeller.post('/api/v3/order/rate_order/', payload);

  return result;
};
