import { jsxs as p, Fragment as e, jsx as t } from "react/jsx-runtime";
import { useRef as f } from "react";
import { i as v, c as C, n as o, o as g, p as x } from "../../../ToolbarLayout.module-cbc8e216.js";
import { useLayoutContainer as N } from "../../../contexts/LayoutContainerContext.js";
import { useToolbarComponentContext as T } from "../../../contexts/ToolbarComponentContext.js";
import "../../../contexts/RPDocumentContext.js";
import "../../../contexts/DocumentPasswordContext.js";
import "../../../contexts/DarkModeContext.js";
import "../../../contexts/RotationContext.js";
import "../../../contexts/LayerContext.js";
import "../../../contexts/ZoomContext.js";
import "../../../contexts/ViewModeContext.js";
import "../../../contexts/ScrollModeContext.js";
import "../../../contexts/VirtualScrollContext.js";
import "../../../contexts/VirtualGridContext.js";
import "../../../contexts/SelectionModeContext.js";
import "../../../contexts/InitialStateContext.js";
import "../../../contexts/FullScreenContext.js";
import "../../../contexts/FileInputContext.js";
import "../../../contexts/DropFileZoneContext.js";
import "../../../contexts/DimensionPagesContext.js";
import "../../../contexts/LocalizationContext.js";
import "../../../contexts/HighlightContext.js";
import "../../../contexts/LicenseContext.js";
import "../../../contexts/DownloadContext.js";
import "../../../contexts/SmoothScrollContext.js";
import "../../../contexts/ElementPageContext.js";
import "../../../contexts/PagesRotateContext.js";
import "../../../contexts/GlobalCurrentPage.js";
import "../../../contexts/LoaderContext.js";
import "../../../contexts/ToolComponentContext.js";
import "../../../contexts/IconToolContext.js";
import "../../../contexts/OtherToolContext.js";
import "../../RPConfig.js";
import "../Container.js";
import "../../../contexts/ViewportContext.js";
import "../WrapperLayout.js";
import "../../../contexts/ThemeContext.js";
import "../../RPDropFileZone.js";
import "../../ui/Button.js";
import "../../../SearchCloseButton-cbf182aa.js";
import "../../ui/Input.js";
import "../../ui/Checkbox.js";
import "../../icons/LoaderIcon.js";
import "../../../contexts/IconContext.js";
import "../../ui/RPTooltip.js";
import "../../ui/DropDown.js";
import "../../../ZoomTool.module-6c5eabbb.js";
import "./MenuItem.js";
import "./MenuSeparator.js";
import "../../../utils/dateFormatter.js";
import "./PropertyItem.js";
import "./RotateTool.js";
const Tr = (a) => {
  const { children: c, toolbar: l } = a, d = f(null), { setContentRef: h } = N(), { active: n } = v(), { showPrintProgress: u } = T(), { progress: b } = C(), { percentage: s } = b || {}, r = l, i = r == null ? void 0 : r.topbar, m = r == null ? void 0 : r.leftSidebar;
  return /* @__PURE__ */ p(e, { children: [
    /* @__PURE__ */ p("div", { className: o["rp-toolbar-layout"], children: [
      i && /* @__PURE__ */ t("div", { "data-rp": "topbar", className: o["rp-topbar-content"], children: i == null ? void 0 : i.component }),
      /* @__PURE__ */ p("div", { className: o["rp-content"], children: [
        /* @__PURE__ */ p(e, { children: [
          m && /* @__PURE__ */ t("div", { "data-rp": "sidebar", className: o["rp-sidebar-content"], children: m == null ? void 0 : m.component }),
          /* @__PURE__ */ t(
            "div",
            {
              "data-rp": "thumbnailSidebar",
              hidden: !n,
              className: o["rp-thumbnails-wrapper"],
              children: /* @__PURE__ */ t(g, { show: n, ref: d })
            }
          )
        ] }),
        /* @__PURE__ */ t("div", { ref: h, className: o["rp-pages"], children: c })
      ] })
    ] }),
    u && s ? /* @__PURE__ */ t(x, { percentage: s }) : null
  ] });
};
export {
  Tr as ToolbarCustom
};
