import { j as a } from "../../../../../_virtual/jsx-runtime.js";
import { forwardRef as u } from "react";
import { useSelectedBrickId as l, useContextMenuVisible as p } from "../../../../../use-editor.js";
import { useBrickManifest as f } from "../../shared/hooks/use-brick-manifest.js";
import { tx as x } from "../../../../style-system/dist/twind.js";
import b from "./EditableBrickTextNavBar.js";
const k = u(
  ({ brick: e, style: n, isContainerChild: s, show: r, ...d }, c) => {
    const i = l(), t = f(e.type), m = p(), o = r && t.isContainer && !i || r && !t.isContainer && !s || i === e.id;
    return !o || m ? null : /* @__PURE__ */ a.jsx(
      "div",
      {
        ref: c,
        "data-ui": !0,
        "data-ui-menu-bars-container": !0,
        role: "navigation",
        className: x(
          "z-[99999] isolate text-base items-center gap-1",
          "transition-opacity duration-150 border rounded-lg",
          o ? "opacity-100 flex" : "opacity-0 hidden",
          t.isContainer ? "border-orange-300" : "border-transparent"
        ),
        style: n,
        ...d,
        children: /* @__PURE__ */ a.jsx(b, { brick: e })
      }
    );
  }
);
export {
  k as default
};
//# sourceMappingURL=EditableBrickNavBar.js.map
