import { defineStore } from "pinia";
import ajax from "@/plugins/ajax.js";

export const useOrderStore = defineStore("OrderStore", {
  state: () => ({
    shipmentStatus: window.gcargo.order_shipment_status || "ready_for_shipment",
    returnedStatus: window.gcargo.order_returned_status || "ready_for_returned",
  }),
  actions: {
    getMappedData: async (orderId) => {
      return await ajax.post("get_mapped_data", {
        data: { order_id: orderId },
      });
    },
  },
});
