import { defineComponent as f, mergeModels as c, useModel as g, onBeforeMount as V, createElementBlock as v, openBlock as P, Fragment as C, createVNode as a, unref as e, withCtx as r } from "vue";
import { useI18n as U } from "vue-i18n";
import { storeToRefs as _ } from "pinia";
import { a as i, c as s, h as S } from "./start-BYfL32Oe.mjs";
import "vue-router";
import "./header-Droxy2Kd.mjs";
import "./moment-h96o7c8I.mjs";
import { u as h } from "./dataTypes-nQ5Ht0CH.mjs";
const G = /* @__PURE__ */ f({
  __name: "DatahubDataTypeSimplePricingValueConfiguration",
  props: /* @__PURE__ */ c({
    attribute: {},
    dataTypeInstance: {},
    remoteScopes: {},
    remoteLanguages: {},
    remoteAttributes: {},
    readonly: { type: Boolean }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(d) {
    const l = g(d, "modelValue"), { t: u } = U(), m = h(), { currencies: y, isCurrenciesLoading: b } = _(m);
    return V(m.fetchCurrencies), (t, o) => (P(), v(C, null, [
      a(e(i), null, {
        default: r(() => [
          a(e(s), {
            modelValue: l.value.isGross,
            "onUpdate:modelValue": o[0] || (o[0] = (n) => l.value.isGross = n),
            label: e(u)("datahub-plugin.simplePricing.isGross"),
            readonly: t.readonly
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      a(e(i), null, {
        default: r(() => [
          a(e(s), {
            modelValue: l.value.msrp,
            "onUpdate:modelValue": o[1] || (o[1] = (n) => l.value.msrp = n),
            label: e(u)("datahub-plugin.simplePricing.msrp"),
            readonly: t.readonly
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      a(e(i), null, {
        default: r(() => [
          a(e(s), {
            modelValue: l.value.promotions,
            "onUpdate:modelValue": o[2] || (o[2] = (n) => l.value.promotions = n),
            label: e(u)("datahub-plugin.simplePricing.promotions"),
            readonly: t.readonly
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      a(e(i), null, {
        default: r(() => [
          a(e(S), {
            modelValue: l.value.currencyCode,
            "onUpdate:modelValue": o[3] || (o[3] = (n) => l.value.currencyCode = n),
            items: e(y),
            loading: e(b),
            label: e(u)("datahub-plugin.simplePricing.currency"),
            readonly: t.readonly,
            "item-title": "name",
            "item-value": "id"
          }, null, 8, ["modelValue", "items", "loading", "label", "readonly"])
        ]),
        _: 1
      }),
      a(e(i), null, {
        default: r(() => [
          a(e(s), {
            modelValue: l.value.readOnly,
            "onUpdate:modelValue": o[4] || (o[4] = (n) => l.value.readOnly = n),
            label: t.$t("datahub-ui.dh-table.readOnly"),
            readonly: t.readonly
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      })
    ], 64));
  }
});
function p(d) {
  const l = d;
  l.__i18n = l.__i18n || [], l.__i18n.push({
    locale: "",
    resource: {
      "en-US": {
        "datahub-plugin": {
          simplePricing: {
            isGross: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Gross prices" } },
            msrp: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Show MSRP field" } },
            promotions: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Use Promotions" } },
            currency: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Currency" } }
          }
        }
      },
      "de-DE": {
        "datahub-plugin": {
          simplePricing: {
            isGross: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Bruttopreise" } },
            msrp: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Zeige UVP-Feld" } },
            promotions: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Promotionen verwenden" } },
            currency: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Währung" } }
          }
        }
      }
    }
  });
}
typeof p == "function" && p(G);
export {
  G as default
};
