import { jsx as t, Fragment as C, jsxs as n } from "react/jsx-runtime";
import { G as p } from "../../../index-f4a9ae4d.js";
import { ClockwiseIcon as l } from "../../icons/ClockwiseIcon.js";
import { MenuItem as c } from "./MenuItem.js";
import { MenuSeparator as k } from "./MenuSeparator.js";
import { useRotate as w } from "../../../utils/hooks/useRotate.js";
import { useToolbarComponentContext as f } from "../../../contexts/ToolbarComponentContext.js";
import { useIconContext as m } from "../../../contexts/IconContext.js";
import i from "../../ui/RPTooltip.js";
import { useLocalizationContext as d } from "../../../contexts/LocalizationContext.js";
import { useIconToolContext as s } from "../../../contexts/IconToolContext.js";
import { useToolComponentContext as T } from "../../../contexts/ToolComponentContext.js";
import '../../../assets/RotateTool.css';const I = {
  "rp-rotate-counterclockwise": "_rp-rotate-counterclockwise_1nqcb_1"
}, h = () => {
  const { rotateClockwiseIcon: e } = m(), { rotateClockwiseIcon: r } = s();
  return e || r || /* @__PURE__ */ t(l, {});
}, x = () => {
  const { rotateCounterClockwiseIcon: e } = m(), { rotateCounterClockwiseIcon: r } = s();
  return e || r || /* @__PURE__ */ t(l, { className: I["rp-rotate-counterclockwise"] });
}, O = () => {
  const { handleRotateClockwise: e, handleRotateCounterclockwise: r } = w(), { rotateTool: a = !0 } = f(), { rotateTool: u = !0 } = T(), { localeMessages: o } = d();
  return !a || !u ? null : /* @__PURE__ */ t(C, { children: /* @__PURE__ */ n(p, { children: [
    /* @__PURE__ */ t(c, { onClick: e, children: /* @__PURE__ */ n(i, { className: "rp-menu-item", content: o == null ? void 0 : o.rotateClockwiseTooltip, children: [
      /* @__PURE__ */ t("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ t(h, {}) }),
      o == null ? void 0 : o.rotateClockwiseLabel
    ] }) }),
    /* @__PURE__ */ t(c, { onClick: r, children: /* @__PURE__ */ n(i, { className: "rp-menu-item", content: o == null ? void 0 : o.rotateCounterclockwiseTooltip, children: [
      /* @__PURE__ */ t("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ t(x, {}) }),
      o == null ? void 0 : o.rotateCounterclockwiseLabel
    ] }) }),
    /* @__PURE__ */ t(k, {})
  ] }) });
};
export {
  O as RotateTool
};
