text: import { defaultPromotionMessages } from "~/scripts/promotion-message-builder";
  import { make } from "vuex-pathify";
  import clone from "lodash.clonedeep";
  
  export const state = () => ({
    profiles: {},
  });
  
  export const mutations = {
    ...make.mutations(state),
    setProfile(state, { profileKey, profile }) {
      if (!Object.keys(state.profiles[profileKey]).length) {
        state.profiles[profileKey] = {
          gbShowPrefix: true,
          gbShowSuffix: true,
          displayGbName: true,
          promotionMessageList: defaultPromotionMessages,
          showSnipe: false,
          yourAge: "BronzeAge",
          shortName: false,
          showLevel: true,
          yourArcBonus: 90,
          yourCfBoost: 0,
          gbPrefix: "",
          gbSuffix: "",
          showOnlySecuredPlaces: false,
          campaign: {},
          cf: {
            coins: 0,
            supplies: 0,
            goods: 0,
            fpBy24h: 0,
            otherRq: 0,
            suppliesGathered: 0,
            cumulativeQuest: 0,
            secondRq: false,
          },
          gb: {},
        };
      }
      for (const key in profile) {
        state.profiles[profileKey][key] = clone(profile[key]);
      }
    },
  
    addProfile(state, { key, profile }) {
      state.profiles[key] = profile;
    },
  
    addGB(state, { key, value }) {
      state.profiles.gb[key] = value;
    },
  };
  
  export const actions = {
    ...make.actions(state),
  };
  
  export const getters = {
    ...make.getters(state),
  };
  