import { computed, watch } from 'vue';
// import { useStore } from 'vuex';

export const useMonitorLang = (cb, delay) => {
  // const store = useStore();
  // TODO: 先写死语言
  const lang = computed(() => 'zhs');
  // const lang = computed(() => store.getters['app/lang']);

  watch(lang, () => {
    setTimeout(() => {
      cb && cb();
    }, delay || 0);
  });
};

export default useMonitorLang;
