import { defineComponent as r, computed as m, createVNode as o, openBlock as l, createElementBlock as d, createBlock as s, resolveDynamicComponent as u, unref as i, withCtx as f, createCommentVNode as h } from "vue";
import { QuestionCircleOutlined as b } from "@ant-design/icons-vue";
import { TypographyText as y, Tooltip as x } from "@aplus-frontend/antdv";
import "../../../../config-provider/index.mjs";
import { useNamespace as _ } from "../../../../config-provider/hooks/use-namespace.mjs";
const C = {
  style: {
    display: "inline-flex"
  }
}, B = /* @__PURE__ */ r({
  __name: "index",
  props: {
    helpMessage: {},
    label: {}
  },
  setup(t) {
    const n = t, {
      m: a
    } = _("ap-descriptions"), c = m(() => {
      const e = n.label;
      return typeof e != "object" ? o("div", {
        class: a("item-label"),
        style: {
          maxWidth: "var(--ap-descriptions-item-label-width, auto)"
        }
      }, [o(y, {
        ellipsis: {
          tooltip: e
        },
        content: e
      }, null)]) : e;
    });
    return (e, p) => (l(), d("span", C, [(l(), s(u(c.value))), t.helpMessage ? (l(), s(i(x), {
      key: 0,
      placement: "topLeft",
      title: t.helpMessage
    }, {
      default: f(() => [o(i(b), {
        class: "ap-descriptions-item-content__help"
      })]),
      _: 1
    }, 8, ["title"])) : h("", !0)]));
  }
});
export {
  B as default
};
