
const lotStore = defineStore('lot', {
  state: () => ({
    lotQueryParams: null
  }),
  actions: {
    setlotQueryParams(value) {
      this.lotQueryParams = value;
    },
    checkClean(obj) {
      console.log(obj)
      if (obj.name == 'lotInfo') {
        this.lotQueryParams = null
      }
      if (obj.name == 'Lot/:productionPlanNo/:lineNumber') {
        this.lotQueryParams = null
      }
    },
    allClean() {
      this.lotQueryParams = null
    },
    otherClean(obj) {
      if (obj.name != 'lotInfo' && obj.name != 'Lot/:productionPlanNo/:lineNumber') {
        this.lotQueryParams = null
      }
    }
  }
})

export default lotStore
