import type { Module } from 'vuex';

export const SET_TRIGGER = 'SET_TRIGGER';
export const SET_PARAMS = 'SET_PARAMS';

export const simplyQuery: Module<Record<string, any>, Record<string, any>> = {
  namespaced: true,
  state: {
    triggerSearch: false,
    params: undefined,
  },
  mutations: {
    [SET_TRIGGER](state, bool: Boolean) {
      state.triggerSearch = bool;
    },
    [SET_PARAMS](state, params: Record<string, any>) {
      state.params = params;
    },
  },
};
