'use strict';

var shallow = require('zustand/shallow');
var withImmutableActions = require('@bigbinary/neeto-commons-frontend/react-utils/withImmutableActions');
var zustand = require('zustand');

/** @type {import("neetocommons/react-utils").ZustandStoreHook} */
var useKeyboardShortcutsStore = zustand.create(withImmutableActions(function (set) {
  return {
    isOpen: false,
    setIsOpen: function setIsOpen(arg) {
      if (typeof arg === "function") {
        set(function (state) {
          return {
            isOpen: arg(state.isOpen)
          };
        });
      } else {
        set({
          isOpen: arg
        });
      }
    }
  };
}));
var useKeyboardShortcutsPaneState = function useKeyboardShortcutsPaneState() {
  var _useKeyboardShortcuts = useKeyboardShortcutsStore(shallow.useShallow(function (store) {
      return {
        isOpen: store["isOpen"],
        setIsOpen: store["setIsOpen"]
      };
    })),
    isOpen = _useKeyboardShortcuts.isOpen,
    setIsOpen = _useKeyboardShortcuts.setIsOpen;
  return [isOpen, setIsOpen];
};

exports.useKeyboardShortcutsPaneState = useKeyboardShortcutsPaneState;
//# sourceMappingURL=useKeyboardShortcutsPaneState-BG_xVteC.js.map
