"use client";
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsxs, jsx } from 'react/jsx-runtime';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
__name(cn, "cn");
var ScrollArea = /* @__PURE__ */ __name(({
  className,
  children,
  ref,
  ...props
}) => /* @__PURE__ */ jsxs(
  ScrollAreaPrimitive.Root,
  {
    className: cn("relative overflow-hidden", className),
    ...props,
    children: [
      /* @__PURE__ */ jsx(
        ScrollAreaPrimitive.Viewport,
        {
          className: "h-full w-full rounded-[inherit]",
          ref,
          children
        }
      ),
      /* @__PURE__ */ jsx(ScrollBar, {}),
      /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
    ]
  }
), "ScrollArea");
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
var ScrollBar = /* @__PURE__ */ __name(({
  className,
  orientation = "vertical",
  ...props
}) => /* @__PURE__ */ jsx(
  ScrollAreaPrimitive.ScrollAreaScrollbar,
  {
    className: cn(
      "flex touch-none transition-colors select-none",
      orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
      orientation === "horizontal" && "h-2.5 border-t border-t-transparent p-[1px]",
      className
    ),
    orientation,
    ...props,
    children: /* @__PURE__ */ jsx(
      ScrollAreaPrimitive.ScrollAreaThumb,
      {
        className: cn(
          "relative rounded-full bg-gray-300",
          orientation === "vertical" && "flex-1"
        )
      }
    )
  }
), "ScrollBar");
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;

export { ScrollArea, ScrollBar };
