import { jsx } from "react/jsx-runtime";
import { track, useEditor } from "@cmpd/editor";
import { useActions } from "../hooks/useActions.mjs";
import { Button } from "./primitives/Button.mjs";
const ExitPenMode = track(function ExitPenMode2() {
  const editor = useEditor();
  const isPenMode = editor.getInstanceState().isPenMode;
  const actions = useActions();
  if (!isPenMode)
    return null;
  const action = actions["exit-pen-mode"];
  return /* @__PURE__ */ jsx(
    Button,
    {
      type: "normal",
      label: action.label,
      iconLeft: action.icon,
      onClick: () => action.onSelect("helper-buttons")
    }
  );
});
export {
  ExitPenMode
};
//# sourceMappingURL=PenModeToggle.mjs.map
