import store from '@/store/index';
import publicCarType from './publicCarType';

export default {
  install() {
    if (store.state.baseData && store.state.baseData.publicCarType) return;
    if (!store.state.baseData) {
      store.registerModule(['baseData'], {
        namespaced: true,
      });
    }
    store.registerModule(['baseData', 'publicCarType'], publicCarType);
  },
  uninstall() {
    store.unregisterModule(['baseData', 'publicCarType']);
  },
};
