"use client";
import { __rest as E, __assign as r } from "../../../tslib/tslib.es6.js";
import * as a from "react";
import { zeroRightClassName as I, fullWidthClassName as Z } from "../../../react-remove-scroll-bar/dist/es2015/constants.js";
import { effectCar as W } from "./medium.js";
import { useMergeRefs as z } from "../../../use-callback-ref/dist/es2015/useMergeRef.js";
var l = function() {
}, m = a.forwardRef(function(e, d) {
  var o = a.useRef(null), n = a.useState({
    onScrollCapture: l,
    onWheelCapture: l,
    onTouchMoveCapture: l
  }), f = n[0], v = n[1], h = e.forwardProps, t = e.children, u = e.className, C = e.removeScrollBar, R = e.enabled, g = e.shards, P = e.sideCar, S = e.noRelative, b = e.noIsolation, w = e.inert, N = e.allowPinchZoom, i = e.as, M = i === void 0 ? "div" : i, _ = e.gapMode, B = E(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), k = P, s = z([o, d]), c = r(r({}, B), f);
  return a.createElement(
    a.Fragment,
    null,
    R && a.createElement(k, { sideCar: W, removeScrollBar: C, shards: g, noRelative: S, noIsolation: b, inert: w, setCallbacks: v, allowPinchZoom: !!N, lockRef: o, gapMode: _ }),
    h ? a.cloneElement(a.Children.only(t), r(r({}, c), { ref: s })) : a.createElement(M, r({}, c, { className: u, ref: s }), t)
  );
});
m.defaultProps = {
  enabled: !0,
  removeScrollBar: !0,
  inert: !1
};
m.classNames = {
  fullWidth: Z,
  zeroRight: I
};
export {
  m as RemoveScroll
};
