'use strict';

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

var vue = require('vue');
var elementPlus = require('element-plus');

"use strict";
const __default__ = vue.defineComponent({
  name: "me-status-tag"
});
var script = /* @__PURE__ */ vue.defineComponent({
  ...__default__,
  props: {
    color: { type: null, required: false, default: "primary" },
    plain: { type: Boolean, required: false, default: false },
    border: { type: Boolean, required: false, default: false }
  },
  setup(__props) {
    const props = __props;
    const getStyle = vue.computed(() => {
      const preset = props.color.startsWith("#") || props.color.startsWith("rgb");
      if (!preset) {
        return {
          backgroundColor: props.plain ? "#fff" : `var(--tag-bg-color-${props.color})`,
          color: `var(--tag-text-color-${props.color})`,
          fontWeight: "bold",
          border: props.border ? `1px solid var(--tag-border-color-${props.color})` : "none"
        };
      } else {
        return {
          backgroundColor: props.plain ? "#fff" : props.color,
          color: props.plain ? props.color : "#fff",
          fontWeight: "bold",
          border: props.border ? `1px solid ${props.color}` : "none"
        };
      }
    });
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTag), vue.mergeProps({
        effect: "dark",
        round: "",
        "disable-transitions": ""
      }, _ctx.$attrs, {
        class: "me-status-tag",
        style: getStyle.value
      }), {
        default: vue.withCtx(() => [
          vue.renderSlot(_ctx.$slots, "default")
        ]),
        _: 3
        /* FORWARDED */
      }, 16, ["style"]);
    };
  }
});

exports.default = script;
//# sourceMappingURL=status-tag.vue2.js.map
