'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(function (store) {
      return {
        isOpen: store["isOpen"],
        setIsOpen: store["setIsOpen"]
      };
    }, shallow.shallow),
    isOpen = _useKeyboardShortcuts.isOpen,
    setIsOpen = _useKeyboardShortcuts.setIsOpen;
  return [isOpen, setIsOpen];
};

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