const operationGuide = {
  state: {
    processList_table: JSON.parse(sessionStorage.getItem('processList_table')) ? JSON.parse(sessionStorage.getItem('processList_table')) : [],
    materialList_table: JSON.parse(sessionStorage.getItem('materialList_table')) ? JSON.parse(sessionStorage.getItem('materialList_table')) : [],
    pic: sessionStorage.getItem('pic') ? sessionStorage.getItem('pic') : '',
    smile: sessionStorage.getItem('smile') ? sessionStorage.getItem('smile') : 0,
    tighteningPosition: sessionStorage.getItem('tighteningPosition') ? sessionStorage.getItem('tighteningPosition') : [],
    greenBoltInformation: sessionStorage.getItem('greenBoltInformation') ? sessionStorage.getItem('greenBoltInformation') : [],
    partAssemblyInformation: {}
  },
  mutations: {
    set_processList_table(state, processList_table) {
      sessionStorage.setItem('processList_table', '[]')
      sessionStorage.setItem('processList_table', JSON.stringify(processList_table))
      state.processList_table = processList_table
    },
    set_materialList_table(state, materialList_table) {
      sessionStorage.setItem('materialList_table', '[]')
      sessionStorage.setItem('materialList_table', JSON.stringify(materialList_table))
      state.materialList_table = materialList_table
    },
    set_pic(state, pic) {
      sessionStorage.setItem('pic', pic)
      state.pic = pic
    },
    set_checkPic(state, checkPic) {
      sessionStorage.setItem('checkPic', checkPic)
      state.checkPic = checkPic
    },
    set_smile(state, smile) {
      sessionStorage.setItem('smile', smile)
      state.smile = smile
    },
    set_tighteningPosition(state, tighteningPosition) {
      sessionStorage.setItem('tighteningPosition', tighteningPosition)
      state.tighteningPosition = tighteningPosition
    },
    set_greenBoltInformation(state, greenBoltInformation) {
      sessionStorage.setItem('greenBoltInformation', greenBoltInformation)
      state.greenBoltInformation = greenBoltInformation
    },
    set_partAssemblyInformation(state, partAssemblyInformation) {
      // sessionStorage.setItem('greenBoltInformation', greenBoltInformation)
      state.partAssemblyInformation = partAssemblyInformation
    }
  }
}

export default operationGuide
