import { jsxs, jsx } from "react/jsx-runtime";
import "react";
import { cn } from "../../lib/utils.js";
import { ScrollAreaRoot } from "../../node_modules/@base-ui/react/esm/scroll-area/root/ScrollAreaRoot.js";
import { ScrollAreaViewport } from "../../node_modules/@base-ui/react/esm/scroll-area/viewport/ScrollAreaViewport.js";
import { ScrollAreaCorner } from "../../node_modules/@base-ui/react/esm/scroll-area/corner/ScrollAreaCorner.js";
import { ScrollAreaScrollbar } from "../../node_modules/@base-ui/react/esm/scroll-area/scrollbar/ScrollAreaScrollbar.js";
import { ScrollAreaThumb } from "../../node_modules/@base-ui/react/esm/scroll-area/thumb/ScrollAreaThumb.js";
function ScrollArea({ className, children, ...props }) {
  return /* @__PURE__ */ jsxs(
    ScrollAreaRoot,
    {
      "data-slot": "scroll-area",
      className: cn("relative", className),
      ...props,
      children: [
        /* @__PURE__ */ jsx(
          ScrollAreaViewport,
          {
            "data-slot": "scroll-area-viewport",
            className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
            children
          }
        ),
        /* @__PURE__ */ jsx(ScrollBar, {}),
        /* @__PURE__ */ jsx(ScrollAreaCorner, {})
      ]
    }
  );
}
function ScrollBar({
  className,
  orientation = "vertical",
  ...props
}) {
  return /* @__PURE__ */ jsx(
    ScrollAreaScrollbar,
    {
      "data-slot": "scroll-area-scrollbar",
      "data-orientation": orientation,
      orientation,
      className: cn(
        "data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none",
        className
      ),
      ...props,
      children: /* @__PURE__ */ jsx(
        ScrollAreaThumb,
        {
          "data-slot": "scroll-area-thumb",
          className: "rounded-full bg-border relative flex-1"
        }
      )
    }
  );
}
export {
  ScrollArea,
  ScrollBar
};
//# sourceMappingURL=scroll-area.js.map
