import { defineStore } from "pinia";
import { ref, reactive } from "vue";
import { message } from "ant-design-vue";

export const usePwoStore = defineStore("pwo", () => {
  const code = ref('');
  const currentJob = ref({});

  function setCode(traceOrderCode: string) {
    code.value = traceOrderCode;
  }

  function setCurrentJob(job: any) {
    currentJob.value = job;
  }

  function getCurrentJob() {
    return currentJob.value;
  }

  return {
    code,
    currentJob,
    setCode,
    setCurrentJob,
    getCurrentJob,
  }
});
