import { defineComponent, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';
import { ElTag } from 'element-plus';

"use strict";
const __default__ = defineComponent({
  name: "me-status-tag"
});
var script = /* @__PURE__ */ 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 = 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 openBlock(), createBlock(unref(ElTag), mergeProps({
        effect: "dark",
        round: "",
        "disable-transitions": ""
      }, _ctx.$attrs, {
        class: "me-status-tag",
        style: getStyle.value
      }), {
        default: withCtx(() => [
          renderSlot(_ctx.$slots, "default")
        ]),
        _: 3
        /* FORWARDED */
      }, 16, ["style"]);
    };
  }
});

export { script as default };
//# sourceMappingURL=status-tag.vue2.mjs.map
