import * as React from 'react';
import { createBEM } from '@zarm-design/bem';
import { ConfigContext } from '../config-provider';
var TabPanel = /*#__PURE__*/React.forwardRef(function (props, ref) {
  var className = props.className,
      selected = props.selected,
      children = props.children,
      style = props.style;

  var _React$useContext = React.useContext(ConfigContext),
      prefixCls = _React$useContext.prefixCls;

  var bem = createBEM('tabs__panel', {
    prefixCls: prefixCls
  });
  var cls = bem([{
    active: selected
  }, className]);
  return /*#__PURE__*/React.createElement("div", {
    ref: ref,
    className: cls,
    style: style,
    role: "tabpanel"
  }, children);
});
TabPanel.displayName = 'TabPanel';
TabPanel.defaultProps = {};
export default TabPanel;