import { __assign, __rest } from "tslib";
import React, { useContext } from 'react';
import classNames from 'classnames';
import { ConfigContext } from '../config-provider/config-context';
import { getPrefixCls } from '../_utils/general';
var TabPanel = React.forwardRef(function (props, ref) {
    var _a;
    var className = props.className, selected = props.selected, children = props.children, customisedCls = props.prefixCls, otherProps = __rest(props, ["className", "selected", "children", "prefixCls"]);
    var configContext = useContext(ConfigContext);
    var prefixCls = getPrefixCls('tabs-panel-item', configContext.prefixCls, customisedCls);
    var cls = classNames(prefixCls, className, (_a = {},
        _a[prefixCls + "_active"] = selected,
        _a));
    return (React.createElement("div", __assign({ ref: ref, className: cls }, otherProps), children));
});
TabPanel.displayName = 'TabPanel';
export default TabPanel;
//# sourceMappingURL=tab-panel.js.map