import * as _vue from "vue";

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

import PropTypes from '../../_util/vue-types';
import { getSlot } from '../../_util/props-util';
export default {
  name: 'PanelContent',
  props: {
    prefixCls: PropTypes.string,
    isActive: PropTypes.bool,
    destroyInactivePanel: PropTypes.bool,
    forceRender: PropTypes.bool,
    role: PropTypes.any
  },
  data: function data() {
    return {
      _isActive: undefined
    };
  },
  render: function render() {
    var _contentCls;

    this._isActive = this.forceRender || this._isActive || this.isActive;

    if (!this._isActive) {
      return null;
    }

    var _this$$props = this.$props,
        prefixCls = _this$$props.prefixCls,
        isActive = _this$$props.isActive,
        destroyInactivePanel = _this$$props.destroyInactivePanel,
        forceRender = _this$$props.forceRender,
        role = _this$$props.role;
    var contentCls = (_contentCls = {}, _defineProperty(_contentCls, "".concat(prefixCls, "-content"), true), _defineProperty(_contentCls, "".concat(prefixCls, "-content-active"), isActive), _contentCls);
    var child = !forceRender && !isActive && destroyInactivePanel ? null : _vue.createVNode("div", {
      "class": "".concat(prefixCls, "-content-box")
    }, [getSlot(this)]);
    return _vue.createVNode("div", {
      "class": contentCls,
      "role": role
    }, [child]);
  }
};