import {
  VuexModule,
  Module,
  getModule,
  Mutation,
  Action
} from "vuex-module-decorators";
interface IAdd {
  k: string;
  v: IDict[];
}
import store from "../index";
import { getDict } from "@/api/dict";
@Module({ dynamic: true, store, name: "dict" })
class Dict extends VuexModule {
  public companyType = getDict("company_type");
  public examineStatus = getDict("examine_status");
  @Mutation
  public add({ k, v }: IAdd) {
    switch (k) {
      case "company_type":
        return (this.companyType = v);
      case "examine_status":
        return (this.examineStatus = v);
    }
  }
}
export default getModule(Dict);
