import { defineComponent, shallowRef, watchEffect, createVNode } from 'vue';
import '../../../utils/index.mjs';
import { collapsePanelProps } from './props.mjs';
import { classNames } from '../../../utils/dom/class.mjs';

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

export { PanelContent as default };
//# sourceMappingURL=PanelContent.mjs.map
