import { jsx as o, jsxs as c } from "react/jsx-runtime";
import { useState as d, useEffect as f } from "react";
import "../../../../../contexts/RPDocumentContext.js";
import "../../../../../contexts/DocumentPasswordContext.js";
import { k as t, S as y, l as C, m as R } from "../../../../../ToolbarLayout.module-cbc8e216.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/LayoutContainerContext.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 { useToolComponentContext as v } from "../../../../../contexts/ToolComponentContext.js";
import { useIconToolContext as x } from "../../../../../contexts/IconToolContext.js";
import "../../../../../contexts/OtherToolContext.js";
import "../../../../RPConfig.js";
import "../../../Container.js";
import { useViewportContext as I } from "../../../../../contexts/ViewportContext.js";
import "../../../../../contexts/ToolbarComponentContext.js";
import "../../../WrapperLayout.js";
import "../../../../../contexts/ThemeContext.js";
import "../../../../RPDropFileZone.js";
import "../../../../ui/Button.js";
import "../../../../ui/RPTooltip.js";
import "../../../../ui/Input.js";
import "../../../../../ZoomTool.module-6c5eabbb.js";
import "../../../../ui/DropDown.js";
import "../../MenuItem.js";
import "../../MenuSeparator.js";
import { ZoomTool as T } from "../../ZoomTool.js";
const Co = (u) => {
  const { icons: i, slots: m } = u, { setIcons: p } = x(), { setSlots: s } = v(), [e, a] = d(!1), [l, n] = d(!1), { isSmallScreen: S } = I(), h = () => S ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
  return f(() => {
    p((r) => ({ ...r, ...i })), a(!0);
  }, [i, p, e, a]), f(() => {
    s((r) => ({ ...r, ...m })), n(!0);
  }, [m, s, l, n]), !e || !l ? null : /* @__PURE__ */ o("div", { "data-rp": "topBar", style: { width: "100%" }, children: /* @__PURE__ */ c("div", { className: t["rp-toolbar-wrapper"], style: h(), children: [
    /* @__PURE__ */ c("div", { "data-rp": "topBarLeft", className: t["rp-toolbar-start"], children: [
      /* @__PURE__ */ o(y, {}),
      /* @__PURE__ */ o(C, {})
    ] }),
    /* @__PURE__ */ o("div", { "data-rp": "topBarCenter", className: t["rp-toolbar-middle"], children: /* @__PURE__ */ o(T, {}) }),
    /* @__PURE__ */ o("div", { "data-rp": "topBarRight", className: t["rp-toolbar-end"], children: /* @__PURE__ */ o(R, {}) })
  ] }) });
};
export {
  Co as RPHorizontalBar
};
