import { defineComponent as m, mergeModels as f, useModel as b, createElementBlock as y, openBlock as F, Fragment as h, createVNode as n, unref as e, withCtx as o } from "vue";
import { useI18n as x } from "vue-i18n";
import { a as d, b as r, c as V } from "./start-BYfL32Oe.mjs";
import "pinia";
import "vue-router";
import "./header-Droxy2Kd.mjs";
import "./moment-h96o7c8I.mjs";
const g = /* @__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: i, ...t }) => ({
        maxFiles: Number(i),
        minFiles: Number(a),
        ...t
      })
    }), { t: u } = x();
    return (a, i) => (F(), y(h, null, [
      n(e(d), null, {
        default: o(() => [
          n(e(r), {
            modelValue: l.value.prefixField,
            "onUpdate:modelValue": i[0] || (i[0] = (t) => l.value.prefixField = t),
            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": i[1] || (i[1] = (t) => l.value.minFiles = t),
            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": i[2] || (i[2] = (t) => l.value.maxFiles = t),
            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": i[3] || (i[3] = (t) => l.value.supportedFileTypes = t),
            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": i[4] || (i[4] = (t) => l.value.readOnly = t),
            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 Dateinamensprä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, gegeben eine Entitäts-ID von 442. Zum Beispiel wenn sich Produktdateien nebeneinander in einer Ordnerstruktur befinden" } },
            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(g);
export {
  g as default
};
