import axios from "../../../config/axios";
import type { NativeOrdersResponseType } from "../types/Types";

export const getNativeOrders = async (
  page: number = 1,
  status: string
): Promise<NativeOrdersResponseType> => {
  const { data } = await axios.get("/admin/orders/native", {
    params: { page, status },
  });
  return data;
};

export const getSellerOrders = async (
  page: number = 1,
  status: string
): Promise<NativeOrdersResponseType> => {
  const { data } = await axios.get("/admin/orders/seller", {
    params: { page, status },
  });
  return data;
};

export const getOrderDetailUser = async (id: string) => {
  const { data } = await axios.get(`/order/${id}/user`);
  return data;
};
