import { defineComponent as f, mergeModels as g, useModel as c, onBeforeMount as V, createElementBlock as v, openBlock as P, Fragment as C, createVNode as n, unref as e, withCtx as r } from "vue";
import { useI18n as U } from "vue-i18n";
import { storeToRefs as _ } from "pinia";
import { c as u, e as s, a as S } from "./start-CE9SawgU.js";
import "./header-Bn1EKnBE.js";
import { u as G } from "./dataTypes-DocW2t0g.js";
const B = /* @__PURE__ */ f({
  __name: "DatahubDataTypeSimplePricingValueConfiguration",
  props: /* @__PURE__ */ g({
    attribute: {},
    dataTypeInstance: {},
    remoteScopes: {},
    remoteLanguages: {},
    remoteAttributes: {},
    readonly: { type: Boolean }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(d) {
    const l = c(d, "modelValue"), { t: i } = U(), m = G(), { currencies: y, isCurrenciesLoading: b } = _(m);
    return V(m.ensureCurrencies), (t, o) => (P(), v(C, null, [
      n(e(u), null, {
        default: r(() => [
          n(e(s), {
            modelValue: l.value.isGross,
            "onUpdate:modelValue": o[0] || (o[0] = (a) => l.value.isGross = a),
            label: e(i)("datahub-plugin.simplePricing.isGross"),
            readonly: t.readonly
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(e(u), null, {
        default: r(() => [
          n(e(s), {
            modelValue: l.value.msrp,
            "onUpdate:modelValue": o[1] || (o[1] = (a) => l.value.msrp = a),
            label: e(i)("datahub-plugin.simplePricing.msrp"),
            readonly: t.readonly
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(e(u), null, {
        default: r(() => [
          n(e(s), {
            modelValue: l.value.promotions,
            "onUpdate:modelValue": o[2] || (o[2] = (a) => l.value.promotions = a),
            label: e(i)("datahub-plugin.simplePricing.promotions"),
            readonly: t.readonly
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(e(u), null, {
        default: r(() => [
          n(e(S), {
            modelValue: l.value.currencyCode,
            "onUpdate:modelValue": o[3] || (o[3] = (a) => l.value.currencyCode = a),
            items: e(y),
            loading: e(b),
            label: e(i)("datahub-plugin.simplePricing.currency"),
            readonly: t.readonly,
            "item-title": "name",
            "item-value": "id"
          }, null, 8, ["modelValue", "items", "loading", "label", "readonly"])
        ]),
        _: 1
      }),
      n(e(u), null, {
        default: r(() => [
          n(e(s), {
            modelValue: l.value.readOnly,
            "onUpdate:modelValue": o[4] || (o[4] = (a) => l.value.readOnly = a),
            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: "UVP-Feld anzeigen" } },
            promotions: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Aktionen verwenden" } },
            currency: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Währung" } }
          }
        }
      }
    }
  });
}
typeof p == "function" && p(B);
export {
  B as default
};
