import { createVNode, defineComponent, computed } from 'vue';
import { InfoCircleFilled, CheckCircleFilled, CloseCircleFilled, ExclamationCircleFilled, LoadingOutlined } from '@ant-design/icons-vue';
import '../../../utils/index.mjs';
import VcNotice from '../../../vue-components/vc-notification/src/Notice.mjs';
import '../../config-provider/src/context/index.mjs';
import useStyle from '../style/index.mjs';
import { classNames } from '../../../utils/dom/class.mjs';
import { useConfigContextInject } from '../../config-provider/src/context/context.mjs';

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

export { PureContent, TypeIcon, PurePanel as default };
//# sourceMappingURL=PurePanel.mjs.map
