import { useLocalStore } from 'mobx-react-lite';
export default function useStore() {
  return useLocalStore(function () {
    return {
      selectedMenu: {},
      noHeader: false,
      setSelectedMenu: function setSelectedMenu(data) {
        this.selectedMenu = data;
      },

      get getSelectedMenu() {
        return this.selectedMenu;
      },

      setNoHeader: function setNoHeader(data) {
        this.noHeader = data;
      },

      get getNoHeader() {
        return this.noHeader;
      },

      expandedKeys: [],
      searchValue: '',
      setExpandedKeys: function setExpandedKeys(keys) {
        this.expandedKeys = keys;
      },

      get getExpandedKeys() {
        return this.expandedKeys.slice();
      },

      setSearchValue: function setSearchValue(value) {
        this.searchValue = value;
      },

      get getSearchValue() {
        return this.searchValue;
      }

    };
  });
}