export default {
  state: {
    // 是否营业中
    isOpen: true,
    dishInfo: {}
  },
  mutations: {
    openRestaurant(state) {
      state.isOpen = true;
    },
    closeRestaurant(state) {
      state.isOpen = false;
    },
    updateDishInfo(state, dish) {
      console.log('----------------')
      console.log(state)
      console.log(dish)
      state.dishInfo = dish
    }
  },
  actions: {
    openRestaurant({ commit }) {
      commit('openRestaurant');
    },
    closeRestaurant({ commit }) {
      commit('closeRestaurant');
    }
  }
}
