import { addUniqueHookByName } from "@mega-apps/utils";

export default (nuxtContext) => {
  addUniqueHookByName("store:headMenuData", (state, getters) => {
    const { menuData, firstMenu } = getters;
    const { layout } = state.setting;
    return layout === "mix" ? firstMenu : menuData;
  });
};
