'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-label"
});
var script = /* @__PURE__ */ vue.defineComponent({
  ...__default__,
  props: {
    title: { type: String, required: false, default: "" },
    desc: { type: String, required: false, default: "" },
    radio: { type: Boolean, required: false, default: false },
    width: { type: String, required: false, default: "150px" },
    top: { type: Boolean, required: false, default: false },
    gap: { type: String, required: false, default: "30px" },
    size: { type: String, required: false, default: "normal" },
    disabled: { type: Boolean, required: false, default: false }
  },
  setup(__props) {
    ;
    const props = __props;
    const meLabelStyle = vue.computed(() => {
      return {
        "--me-label-padding": props.size == "small" ? "4px" : "10px",
        "--el-radio-input-display": props.radio ? "flex" : "none",
        "--is-checked-display": props.radio ? "none" : "flex",
        "--is-checked-before-width": props.size == "small" ? "10px" : "14px",
        "--is-checked-before-height": props.size == "small" ? "4px" : "6px",
        "--is-checked-before-top": props.top ? "0" : "auto",
        "--is-checked-before-bottom": props.size == "small" ? "5px" : "7px",
        "--is-checked-before-right": props.size == "small" ? "0" : "2px",
        "--is-checked-border-bottom": borderBottomStyle.value,
        "--is-checked-border-top": borderTopStyle.value,
        "--is-checked-border-width": borderWidth.value,
        "margin-right": props.gap
      };
    });
    const borderWidth = vue.computed(() => {
      if (props.size == "small") {
        return "20px";
      } else {
        return "30px";
      }
    });
    const borderBottomStyle = vue.computed(() => {
      if (props.disabled) {
        return props.top ? "0" : `${borderWidth.value} solid var(--el-disabled-border-color)`;
      } else {
        return props.top ? "0" : `${borderWidth.value} solid #206bc4`;
      }
    });
    const borderTopStyle = vue.computed(() => {
      if (props.disabled) {
        return props.top ? `${borderWidth.value} solid var(--el-disabled-border-color)` : "0";
      } else {
        return props.top ? `${borderWidth.value} solid #206bc4` : "0";
      }
    });
    const disabledStyle = vue.computed(() => {
      if (props.disabled) {
        return {
          backgroundColor: "var(--el-disabled-bg-color)",
          color: "var(--el-disabled-text-color)",
          borderColor: "var(--el-disabled-border-color)",
          boxShadow: "none"
        };
      }
    });
    return (_ctx, _cache) => {
      return vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElRadio), vue.mergeProps(_ctx.$attrs, {
        class: "me-label",
        style: { width: __props.width, ...disabledStyle.value, ...meLabelStyle.value }
      }), {
        default: vue.withCtx(() => [
          vue.createElementVNode(
            "div",
            {
              class: "text-primary",
              style: vue.normalizeStyle({ ...disabledStyle.value })
            },
            vue.toDisplayString(__props.title),
            5
            /* TEXT, STYLE */
          ),
          vue.createElementVNode(
            "div",
            {
              class: "text-secondary",
              style: vue.normalizeStyle({ ...disabledStyle.value })
            },
            vue.toDisplayString(__props.desc),
            5
            /* TEXT, STYLE */
          )
        ]),
        _: 1
        /* STABLE */
      }, 16, ["style"]);
    };
  }
});

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