import { defineComponent as g, computed as n, openBlock as c, createElementBlock as i, normalizeClass as r, createElementVNode as o, createCommentVNode as y, toDisplayString as C, renderSlot as m } from "vue";
import { C as p } from "../Shared/base-PQGakkrl.js";
const b = {
  key: 0,
  class: "tip-must"
}, h = { class: "control-label-text" }, E = /* @__PURE__ */ g({
  name: "ClFormGroup",
  __name: "Index",
  props: {
    colRatio: {
      type: String,
      default: "2:10"
    },
    className: {
      type: String,
      default: ""
    },
    label: String,
    isTipMust: {
      type: Boolean,
      default: !1
    },
    isPlaintext: {
      type: Boolean,
      default: !1
    }
  },
  setup(a) {
    const s = a, u = n(() => {
      const t = {
        "form-group": !0,
        "form-group-plaintext": s.isPlaintext,
        row: !0
      };
      return p.isEmpty(s.className) || s.className.split(" ").forEach((e) => {
        p.isEmpty(e) || (t[e] = !0);
      }), t;
    }), f = n(() => {
      let t = "2";
      const e = s.colRatio.split(":");
      e.length > 0 && (t = e[0]);
      const l = {
        "control-label": !0
      };
      return l[`col-sm-${t}`] = !0, l[`col-${t}`] = !0, l;
    }), d = n(() => {
      let t = "10";
      const e = s.colRatio.split(":");
      e.length > 1 && (t = e[1]);
      const l = {};
      return l[`col-sm-${t}`] = !0, l[`col-${t}`] = !0, l;
    });
    return (t, e) => (c(), i("div", {
      class: r(u.value)
    }, [
      o("div", {
        class: r(f.value)
      }, [
        o("span", null, [
          a.isTipMust ? (c(), i("span", b, "*")) : y("", !0),
          o("span", h, C(a.label), 1),
          m(t.$slots, "labelExtend")
        ])
      ], 2),
      o("div", {
        class: r(d.value)
      }, [
        m(t.$slots, "default")
      ], 2)
    ], 2));
  }
});
export {
  E as default
};
//# sourceMappingURL=ClFormGroup.js.map
