import { defineComponent as m, mergeModels as f, useModel as b, createElementBlock as y, openBlock as F, Fragment as g, createVNode as n, unref as e, withCtx as o } from "vue";
import { useI18n as x } from "vue-i18n";
import { c as d, d as r, e as V } from "./start-CE9SawgU.js";
import "pinia";
import "./header-Bn1EKnBE.js";
const h = /* @__PURE__ */ m({
  __name: "DatahubDataTypeFileValueConfiguration",
  props: /* @__PURE__ */ f({
    attribute: {},
    dataTypeInstance: {},
    remoteScopes: {},
    remoteLanguages: {},
    remoteAttributes: {},
    readonly: { type: Boolean }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(s) {
    const l = b(s, "modelValue", {
      set: ({ minFiles: a, maxFiles: t, ...i }) => ({
        maxFiles: Number(t),
        minFiles: Number(a),
        ...i
      })
    }), { t: u } = x();
    return (a, t) => (F(), y(g, null, [
      n(e(d), null, {
        default: o(() => [
          n(e(r), {
            modelValue: l.value.prefixField,
            "onUpdate:modelValue": t[0] || (t[0] = (i) => l.value.prefixField = i),
            label: e(u)("datahub-plugin.files.prefixField"),
            readonly: a.readonly,
            hint: e(u)("datahub-plugin.files.prefixHint"),
            "persistent-hint": ""
          }, null, 8, ["modelValue", "label", "readonly", "hint"])
        ]),
        _: 1
      }),
      n(e(d), null, {
        default: o(() => [
          n(e(r), {
            modelValue: l.value.minFiles,
            "onUpdate:modelValue": t[1] || (t[1] = (i) => l.value.minFiles = i),
            modelModifiers: { number: !0 },
            label: e(u)("datahub-plugin.files.minFiles"),
            type: "number",
            readonly: a.readonly,
            "persistent-placeholder": ""
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(e(d), null, {
        default: o(() => [
          n(e(r), {
            modelValue: l.value.maxFiles,
            "onUpdate:modelValue": t[2] || (t[2] = (i) => l.value.maxFiles = i),
            modelModifiers: { number: !0 },
            label: e(u)("datahub-plugin.files.maxFiles"),
            type: "number",
            readonly: a.readonly,
            "persistent-placeholder": ""
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(e(d), null, {
        default: o(() => [
          n(e(r), {
            modelValue: l.value.supportedFileTypes,
            "onUpdate:modelValue": t[3] || (t[3] = (i) => l.value.supportedFileTypes = i),
            label: e(u)("datahub-plugin.files.supportedFileTypes"),
            readonly: a.readonly,
            hint: e(u)("datahub-plugin.files.supportedFileTypesHint"),
            "persistent-hint": ""
          }, null, 8, ["modelValue", "label", "readonly", "hint"])
        ]),
        _: 1
      }),
      n(e(d), null, {
        default: o(() => [
          n(e(V), {
            modelValue: l.value.readOnly,
            "onUpdate:modelValue": t[4] || (t[4] = (i) => l.value.readOnly = i),
            label: a.$t("datahub-ui.dh-table.readOnly"),
            readonly: a.readonly
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      })
    ], 64));
  }
});
function p(s) {
  const l = s;
  l.__i18n = l.__i18n || [], l.__i18n.push({
    locale: "",
    resource: {
      "en-US": {
        "datahub-plugin": {
          files: {
            prefixField: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Field for filename prefix" } },
            prefixHint: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "For example 'ID'. An uploaded file will then be renamed from 'doc.pdf' to '442_doc.pdf' given an entity id of 442. For example, product files are next to each other in a folder structure." } },
            minFiles: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Min. number of files" } },
            maxFiles: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Max. number of files" } },
            supportedFileTypes: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Allowed file extensions" } },
            supportedFileTypesHint: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "For example 'pdf'" } }
          }
        }
      },
      "de-DE": {
        "datahub-plugin": {
          files: {
            prefixField: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Feld für Dateinamen-Präfix" } },
            prefixHint: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Zum Beispiel 'ID'. Eine hochgeladene Datei wird dann von 'doc.pdf' in '442_doc.pdf' umbenannt, wenn die Entitäts-ID 442 angegeben ist. Zum Beispiel wenn Produktdateien nebeneinander in einer Ordnerstruktur liegen." } },
            minFiles: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Min. Anzahl Dateien" } },
            maxFiles: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Max. Anzahl Dateien" } },
            supportedFileTypes: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Erlaubte Dateierweiterungen" } },
            supportedFileTypesHint: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Zum Beispiel 'pdf'" } }
          }
        }
      }
    }
  });
}
typeof p == "function" && p(h);
export {
  h as default
};
