import { jsx as _jsx } from "react/jsx-runtime";
import React, { useContext } from 'react';
import cls from 'clsx';
import ConfigProviderContext from '../config-provider/ConfigProviderContext';
const SwiperItem = React.forwardRef((props, ref) => {
  const wrapperRef = React.useRef(null);
  const {
    prefixCls,
    createNamespace
  } = useContext(ConfigProviderContext);
  const [bem] = createNamespace('swiper-item', prefixCls);

  const getHeight = () => {
    var _a;

    return (_a = wrapperRef.current) === null || _a === void 0 ? void 0 : _a.clientHeight;
  };

  React.useImperativeHandle(ref, () => ({
    getHeight,
    self: wrapperRef.current
  }));
  return _jsx("div", Object.assign({
    ref: wrapperRef,
    className: cls(props.className, bem()),
    onClick: props.onClick,
    style: props.style
  }, {
    children: props.children
  }));
});
export default SwiperItem;