"use client";
import * as React from "react";
import { useScrollAreaRootContext } from "../root/ScrollAreaRootContext.js";
import { useRenderElement } from "../../utils/useRenderElement.js";
const ScrollAreaCorner = /* @__PURE__ */ React.forwardRef(function ScrollAreaCorner2(componentProps, forwardedRef) {
  const {
    render,
    className,
    ...elementProps
  } = componentProps;
  const {
    cornerRef,
    cornerSize,
    hiddenState
  } = useScrollAreaRootContext();
  const element = useRenderElement("div", componentProps, {
    ref: [forwardedRef, cornerRef],
    props: [{
      style: {
        position: "absolute",
        bottom: 0,
        insetInlineEnd: 0,
        width: cornerSize.width,
        height: cornerSize.height
      }
    }, elementProps]
  });
  if (hiddenState.cornerHidden) {
    return null;
  }
  return element;
});
if (process.env.NODE_ENV !== "production") ScrollAreaCorner.displayName = "ScrollAreaCorner";
export {
  ScrollAreaCorner
};
//# sourceMappingURL=ScrollAreaCorner.js.map
