import { Action, getModule, Module, Mutation, VuexModule } from 'vuex-module-decorators';
import store from '@/store';

export interface OfflineStoragedata {
  orderNo?: string;
  number?: string;
  kuwei?: string;
  list?: any[];
  index?: string;
  sn?: string;
}
@Module({
  dynamic: true,
  store,
  namespaced: true,
  name: 'data',
})
class usedataService extends VuexModule {
  OfflineStoragedata: OfflineStoragedata | null = null;
  @Mutation
  setOfflineStoragedata(data: OfflineStoragedata) {
    this.OfflineStoragedata = data;
  }

  @Action
  cacheData(data: OfflineStoragedata) {
    this.context.commit('setOfflineStoragedata', data);
  }
}
export const usedata = getModule(usedataService);
