'use strict';

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

var vue = require('vue');
var iconsVue = require('@ant-design/icons-vue');
require('../../../utils/index.cjs');
var Notice = require('../../../vue-components/vc-notification/src/Notice.cjs');
require('../../config-provider/src/context/index.cjs');
var index = require('../style/index.cjs');
var _class = require('../../../utils/dom/class.cjs');
var context = require('../../config-provider/src/context/context.cjs');

const TypeIcon = {
  info: vue.createVNode(iconsVue.InfoCircleFilled, null, null),
  success: vue.createVNode(iconsVue.CheckCircleFilled, null, null),
  error: vue.createVNode(iconsVue.CloseCircleFilled, null, null),
  warning: vue.createVNode(iconsVue.ExclamationCircleFilled, null, null),
  loading: vue.createVNode(iconsVue.LoadingOutlined, null, null)
};
const PureContent = /* @__PURE__ */ vue.defineComponent({
  name: "PureContent",
  inheritAttrs: false,
  props: ["prefixCls", "type", "icon"],
  setup(props, {
    slots
  }) {
    return () => {
      var _a;
      return vue.createVNode("div", {
        "class": _class.classNames(`${props.prefixCls}-custom-content`, `${props.prefixCls}-${props.type}`)
      }, [props.icon || TypeIcon[props.type], vue.createVNode("span", null, [(_a = slots.default) == null ? void 0 : _a.call(slots)])]);
    };
  }
});
var PurePanel = /* @__PURE__ */ vue.defineComponent({
  name: "PurePanel",
  inheritAttrs: false,
  props: ["prefixCls", "class", "type", "icon", "content"],
  setup(props, {
    slots,
    attrs
  }) {
    const {
      getPrefixCls
    } = context.useConfigContextInject();
    const prefixCls = vue.computed(() => props.prefixCls || getPrefixCls("message"));
    const [, hashId] = index.default(prefixCls);
    return vue.createVNode(Notice.default, {
      ...attrs,
      "prefixCls": prefixCls.value,
      "class": _class.classNames(hashId.value, `${prefixCls.value}-notice-pure-panel`),
      "noticeKey": "pure",
      "duration": null
    }, {
      default: () => [vue.createVNode(PureContent, {
        "prefixCls": prefixCls.value,
        "type": props.type,
        "icon": props.icon
      }, {
        default: () => {
          var _a;
          return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
        }
      })]
    });
  }
});

exports.PureContent = PureContent;
exports.TypeIcon = TypeIcon;
exports.default = PurePanel;
//# sourceMappingURL=PurePanel.cjs.map
