/*
 * @Author: your name
 * @Date: 2021-06-18 10:43:12
 * @LastEditTime: 2021-06-19 17:00:27
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \evm-store\tools\frontend\src\utils\translate.js
 */
export default {
  computed: {
    /**
     * Selected translate
     * @returns {*}
     */
    lang() {
      // If selected translations exists
      if (Object.prototype.hasOwnProperty.call(
        this.$store.state.fm.settings.translations,
        this.$store.state.fm.settings.lang,
      )) {
        return this.$store.state.fm.settings.translations[
          this.$store.state.fm.settings.lang
        ];
      }
      // default translate - en
      return this.$store.state.fm.settings.translations.en;
    },
  },
};
