import { defineComponent as g, computed as E, openBlock as o, createBlock as s, unref as r, mergeProps as m, withCtx as u, createElementBlock as p, Fragment as h, renderList as x, createSlots as B, createElementVNode as c, normalizeClass as d, createTextVNode as D, toDisplayString as i, createCommentVNode as v, createVNode as b, normalizeStyle as N } from "vue";
import { useNamespace as P, ElDescriptions as S, ElDescriptionsItem as T, ElSpace as V, ElProgress as C, ElRate as I } from "element-plus";
import { wetProDescriptionsProps as w } from "./types.mjs";
import z from "../../form-fileds/base/editable-table/index.mjs";
import A from "../../pro-table/src/components/enum.vue.mjs";
import W from "../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get.mjs";
const j = { key: 0 }, F = {
  key: 1,
  style: { width: "100%", display: "inline-block" }
}, L = { key: 4 }, M = /* @__PURE__ */ g({
  __name: "index",
  props: w,
  setup(f) {
    const a = P("pro-descriptions"), l = f, _ = E(() => l.properties.map((t) => t)), n = (t) => W(l.data, t, void 0), k = (t) => t || l.span || 24;
    return (t, R) => (o(), s(r(S), m(l, {
      properties: "",
      data: "",
      class: [r(a).b(), r(a).is("no-border", !l.border)]
    }), {
      default: u(() => [
        (o(!0), p(h, null, x(_.value, (e) => (o(), s(r(T), m(e, {
          label: "",
          span: k(e.span),
          key: Array.isArray(e.property) ? e.property.join("") : e.property
        }), B({
          default: u(() => {
            var y;
            return [
              c("div", {
                class: d(r(a).e("item-container"))
              }, [
                l.border ? v("", !0) : (o(), p("span", {
                  key: 0,
                  class: d([r(a).e("item-label"), r(a).is("blod", l.labelBold)])
                }, [
                  D(i(e.label || e.title) + " ", 1),
                  l.border ? v("", !0) : (o(), p("span", j, "："))
                ], 2)),
                c("span", {
                  class: d([r(a).e("item-content"), r(a).is("slider", e.valueType === "slider")])
                }, [
                  e.valueEnum ? (o(), s(r(V), { key: 0 }, {
                    default: u(() => [
                      b(A, {
                        "value-enum": e.valueEnum,
                        value: n(e.property)
                      }, null, 8, ["value-enum", "value"])
                    ]),
                    _: 2
                  }, 1024)) : e.valueType === "slider" ? (o(), p("div", F, [
                    b(r(C), {
                      percentage: n(e.property)
                    }, null, 8, ["percentage"])
                  ])) : e.valueType === "rate" ? (o(), s(r(I), {
                    key: 2,
                    disabled: "",
                    "model-value": n(e.property)
                  }, null, 8, ["model-value"])) : e.valueType === "array" ? (o(), s(r(z), {
                    key: 3,
                    readonly: "",
                    columns: (y = e.formInputProps) == null ? void 0 : y.columns,
                    "model-value": n(e.property)
                  }, null, 8, ["columns", "model-value"])) : (o(), p("span", L, i(n(e.property)), 1))
                ], 2)
              ], 2)
            ];
          }),
          _: 2
        }, [
          l.border ? {
            name: "label",
            fn: u(() => [
              c("span", {
                style: N({ fontWeight: l.labelBold ? "600" : "normal" })
              }, i(e.label || e.title), 5)
            ]),
            key: "0"
          } : void 0
        ]), 1040, ["span"]))), 128))
      ]),
      _: 1
    }, 16, ["class"]));
  }
});
export {
  M as default
};
