import React, { useContext } from 'react';
import cls from 'clsx';
import ConfigProviderContext from '../config-provider/ConfigProviderContext';
var SwiperItem = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var wrapperRef = React.useRef(null);

  var _useContext = useContext(ConfigProviderContext),
      prefixCls = _useContext.prefixCls,
      createNamespace = _useContext.createNamespace;

  var _createNamespace = createNamespace('swiper-item', prefixCls),
      bem = _createNamespace[0];

  var getHeight = function getHeight() {
    var _wrapperRef$current;

    return (_wrapperRef$current = wrapperRef.current) == null ? void 0 : _wrapperRef$current.clientHeight;
  };

  React.useImperativeHandle(ref, function () {
    return {
      getHeight: getHeight,
      self: wrapperRef.current
    };
  });
  return /*#__PURE__*/React.createElement("div", {
    ref: wrapperRef,
    className: cls(props.className, bem()),
    onClick: props.onClick,
    style: props.style
  }, props.children);
});
export default SwiperItem;