import { jsx as t } from "react/jsx-runtime";
import { useEffect as c } from "react";
import { w as p } from "../../helpers-D56OHkFI.js";
import '../../assets/index12.css';const d = "_controls_1kzpr_15", i = "_wrapper_1kzpr_33", s = {
  controls: d,
  wrapper: i
}, f = ({
  children: a,
  onSaveShortcut: e,
  ...n
}) => (c(() => {
  if (!e)
    return;
  const o = (r) => {
    !(r.key.toLowerCase() === "s" && (r.metaKey || r.ctrlKey) && !r.altKey && !r.shiftKey) || r.defaultPrevented || r.repeat || (r.preventDefault(), e());
  };
  return document.addEventListener("keydown", o), () => {
    document.removeEventListener("keydown", o);
  };
}, [e]), /* @__PURE__ */ t("div", { className: s.wrapper, "data-wrapper": !0, "data-component": "controls", children: /* @__PURE__ */ t("div", { className: s.controls, children: /* @__PURE__ */ t("menu", { "data-animation": "stagger", ...n, children: p(a) }) }) }));
export {
  f as Controls
};
//# sourceMappingURL=index.js.map
