import { jsxs as n, Fragment as p, jsx as t } from "react/jsx-runtime";
import { MenuItem as u } from "./MenuItem.js";
import { InfoIcon as s } from "../../icons/InfoIcon.js";
import { useOtherToolContext as l } from "../../../contexts/OtherToolContext.js";
import { useToolbarComponentContext as d } from "../../../contexts/ToolbarComponentContext.js";
import { useIconContext as f } from "../../../contexts/IconContext.js";
import P from "../../ui/RPTooltip.js";
import { useLocalizationContext as x } from "../../../contexts/LocalizationContext.js";
import { useIconToolContext as C } from "../../../contexts/IconToolContext.js";
import { useToolComponentContext as I } from "../../../contexts/ToolComponentContext.js";
import { MenuSeparator as T } from "./MenuSeparator.js";
const a = () => {
  const { documentPropertiesIcon: e } = f(), { documentPropertiesIcon: r } = C();
  return e || r || /* @__PURE__ */ t(s, {});
}, F = () => {
  const { setActiveDocumentProperties: e } = l(), { documentProperties: r = !0 } = d(), { documentProperties: m = !0, scrollModeTool: i } = I(), { localeMessages: o } = x();
  return !r || !m ? null : /* @__PURE__ */ n(p, { children: [
    i && /* @__PURE__ */ t(T, {}),
    /* @__PURE__ */ t(u, { onClick: () => e((c) => !c), children: /* @__PURE__ */ n(P, { className: "rp-menu-item", content: o == null ? void 0 : o.documentPropertiesTooltip, children: [
      /* @__PURE__ */ t("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ t(a, {}) }),
      o == null ? void 0 : o.documentPropertiesLabel
    ] }) })
  ] });
};
export {
  F as DocumentProperties
};
