import { defineComponent as b, createElementBlock as t, openBlock as e, Fragment as l, createTextVNode as V, toDisplayString as r, unref as d, createElementVNode as p, createBlock as _, createCommentVNode as g, withCtx as m, renderList as f, normalizeProps as k, guardReactiveProps as y } from "vue";
import { useI18n as C } from "vue-i18n";
import { L as R, o as D } from "./start-CE9SawgU.js";
import "pinia";
import "./header-Bn1EKnBE.js";
const M = {
  key: 2,
  class: "d-flex align-center"
}, T = { class: "datahub-label mr-3" }, v = /* @__PURE__ */ b({
  __name: "DatahubDataTypeVariantValueRenderer",
  props: {
    row: {},
    rowIndex: {},
    cell: {},
    cellValue: {},
    dataTypeInstance: {},
    modelValue: {}
  },
  setup(s) {
    const { t: n } = C();
    return (a, $) => a.cellValue ? a.cellValue.isMasterEntity ? (e(), t(l, { key: 1 }, [
      V(r(d(n)("datahub-plugin.variant-value.VariantValueMasterRender", {
        numberOfChildren: a.cellValue.numberOfChildren
      })), 1)
    ], 64)) : (e(), t("div", M, [
      p("div", T, r(d(n)("datahub-plugin.variant-value.VariantValueChildRender")), 1),
      a.cellValue.definingValues?.length ? (e(), _(d(R), { key: 0 }, {
        activator: m(({ props: i }) => [
          p("div", k(y(i)), [
            (e(!0), t(l, null, f(a.cellValue.definingValues.slice(0, 2), ({ attributeName: u, value: o }, c) => (e(), t("div", { key: c }, r(`${u}: ${o}${c === 1 && a.cellValue.definingValues.length > 2 ? "..." : ""}`), 1))), 128))
          ], 16)
        ]),
        default: m(() => [
          (e(!0), t(l, null, f(a.cellValue.definingValues, ({ attributeName: i, value: u }, o) => (e(), t("div", { key: o }, r(`${i}: ${u}`), 1))), 128))
        ]),
        _: 1
      })) : g("", !0)
    ])) : (e(), t(l, { key: 0 }, [
      V(r(""))
    ], 64));
  }
});
function h(s) {
  const n = s;
  n.__i18n = n.__i18n || [], n.__i18n.push({
    locale: "",
    resource: {
      "en-US": {
        "datahub-plugin": {
          "variant-value": {
            VariantValueMasterRender: { t: 0, b: { t: 2, i: [{ t: 3, v: "Master product with " }, { t: 4, k: "numberOfChildren" }, { t: 3, v: " Variants" }] } },
            VariantValueChildRender: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Variant" } }
          }
        }
      },
      "de-DE": {
        "datahub-plugin": {
          "variant-value": {
            VariantValueMasterRender: { t: 0, b: { t: 2, i: [{ t: 3, v: "Hauptprodukt mit " }, { t: 4, k: "numberOfChildren" }, { t: 3, v: " Varianten" }] } },
            VariantValueChildRender: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Variante" } }
          }
        }
      }
    }
  });
}
typeof h == "function" && h(v);
const N = /* @__PURE__ */ D(v, [["__scopeId", "data-v-1ac71110"]]);
export {
  N as default
};
