'use strict';

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

var vue = require('vue');

"use strict";
const __default__ = vue.defineComponent({
  name: "me-ribbon"
});
var script = /* @__PURE__ */ vue.defineComponent({
  ...__default__,
  props: {
    bgColor: { type: String, required: false, default: "" },
    height: { type: String, required: false, default: "40px" },
    type: { type: String, required: false, default: "primary" }
  },
  setup(__props, { expose: __expose }) {
    const props = __props;
    const getBgColor = () => {
      const primary = "linear-gradient(to right, #4f8aef, #1e62d7)";
      const warning = "linear-gradient(to right, #FDC866, #F8B137)";
      const danger = "linear-gradient(to right, #F56C6C, #F15454)";
      const success = "linear-gradient(to right, #67C23A, #44C405)";
      const info = "linear-gradient(to right, #909399, #65656A)";
      return {
        primary,
        warning,
        danger,
        success,
        info
      };
    };
    const ribbonStyle = vue.computed(() => {
      const bgColor = getBgColor()[props.type];
      if (bgColor) {
        return {
          height: props.height,
          "--height": props.height,
          "--bg-color": props.bgColor || bgColor
        };
      } else {
        return {};
      }
    });
    __expose({
      getBgColor
    });
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createElementBlock(
        "div",
        {
          class: "me-ribbon",
          style: vue.normalizeStyle({ ...ribbonStyle.value })
        },
        [
          vue.renderSlot(_ctx.$slots, "default")
        ],
        4
        /* STYLE */
      );
    };
  }
});

exports.default = script;
//# sourceMappingURL=ribbon.vue2.js.map
