'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var classNames = require('../_util/classNames.js');
var commonProps = require('./commonProps.js');

var PanelContent = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "PanelContent",
  props: commonProps.collapsePanelProps(),
  setup(props, {
    slots
  }) {
    const rendered = vue.shallowRef(false);
    vue.watchEffect(() => {
      if (props.isActive || props.forceRender)
        rendered.value = true;
    });
    return () => {
      var _a;
      if (!rendered.value)
        return null;
      const {
        prefixCls,
        isActive,
        role
      } = props;
      return vue.createVNode("div", {
        "class": classNames.default(`${prefixCls}-content`, {
          [`${prefixCls}-content-active`]: isActive,
          [`${prefixCls}-content-inactive`]: !isActive
        }),
        "role": role
      }, [vue.createVNode("div", {
        "class": `${prefixCls}-content-box`
      }, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
    };
  }
});

exports.default = PanelContent;
//# sourceMappingURL=PanelContent.js.map
