'use strict';

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

var vue = require('vue');
var CloseOutlined = require('@ant-design/icons-vue');
var classNames = require('../_util/classNames.js');
var context = require('../config-provider/context.js');
var Notice = require('../vc-notification/Notice.js');
var index = require('./style/index.js');

const TypeIcon = {
  info: vue.createVNode(CloseOutlined.InfoCircleFilled, null, null),
  success: vue.createVNode(CloseOutlined.CheckCircleFilled, null, null),
  error: vue.createVNode(CloseOutlined.CloseCircleFilled, null, null),
  warning: vue.createVNode(CloseOutlined.ExclamationCircleFilled, null, null),
  loading: vue.createVNode(CloseOutlined.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": classNames.default(`${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, vue.mergeProps(attrs, {
      "prefixCls": prefixCls.value,
      "class": classNames.default(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.js.map
