"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var React = _interopRequireWildcard(require("react"));

var _bem = require("@zarm-design/bem");

var _configProvider = require("../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(_configProvider.ConfigContext),
      prefixCls = _React$useContext.prefixCls;

  var bem = (0, _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 = {};
var _default = TabPanel;
exports.default = _default;