import store from '@/store';
import localStorage from '@/service/localStorage.service';

export const getConfigType = (name, configDefault) => {
  try {
    const { getters = {} } = store || {};
    const key = getters[name] || '';

    return key || localStorage.get(name) || configDefault;
  } catch (error) {
    console.log(error);
  }
  return configDefault;
};
