import { jsxs as d, jsx as l } from "react/jsx-runtime";
import * as r from "@radix-ui/react-scroll-area";
import { c as i } from "../../index-BtlgVD4m.js";
const m = ({ ref: a, className: t, children: e, orientation: o = "both", onScroll: s, ...n }) => /* @__PURE__ */ d(r.Root, { className: i("relative overflow-hidden", t), ...n, children: [
  /* @__PURE__ */ l(r.Viewport, { ref: a, className: "h-full w-full rounded-[inherit]", onScroll: s, children: e }),
  ["vertical", "both"].includes(o) && /* @__PURE__ */ l(c, { orientation: "vertical" }),
  ["horizontal", "both"].includes(o) && /* @__PURE__ */ l(c, { orientation: "horizontal" }),
  /* @__PURE__ */ l(r.Corner, {})
] });
m.displayName = r.Root.displayName;
const c = ({
  ref: a,
  className: t,
  orientation: e = "vertical",
  ...o
}) => /* @__PURE__ */ l(
  r.ScrollAreaScrollbar,
  {
    ref: a,
    orientation: e,
    className: i(
      "flex touch-none select-none transition-colors",
      e === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
      e === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
      "z-[1]",
      t
    ),
    ...o,
    children: /* @__PURE__ */ l(r.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-[var(--base-border)]" })
  }
);
c.displayName = r.ScrollAreaScrollbar.displayName;
export {
  m as ScrollArea,
  c as ScrollBar
};
//# sourceMappingURL=ScrollAreaPrimitive.js.map
