import { defineComponent as y, mergeModels as f, useModel as V, createElementBlock as v, openBlock as x, Fragment as L, createVNode as n, unref as l, withCtx as u } from "vue";
import { useI18n as M } from "vue-i18n";
import { c as d, d as i, e as s } from "./start-CE9SawgU.js";
import "pinia";
import "./header-Bn1EKnBE.js";
import { _ as h } from "./DatahubBadWordFilter-ifJn2ov6.js";
const w = /* @__PURE__ */ y({
  __name: "DatahubDataTypeTextFieldConfiguration",
  props: /* @__PURE__ */ f({
    attribute: {},
    dataTypeInstance: {},
    remoteScopes: {},
    remoteLanguages: {},
    remoteAttributes: {},
    readonly: { type: Boolean }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(m) {
    const e = V(m, "modelValue", {
      set: ({ max: a, min: t, rows: o, isEditor: b, ...g }) => ({
        max: Number(a),
        min: Number(t),
        rows: Number(o),
        isEditor: !!b,
        ...g
      })
    }), { t: r } = M();
    return (a, t) => (x(), v(L, null, [
      n(l(d), null, {
        default: u(() => [
          n(l(i), {
            modelValue: e.value.min,
            "onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.min = o),
            modelModifiers: { number: !0 },
            label: l(r)("datahub-plugin.textField.minLength"),
            type: "number",
            readonly: a.readonly,
            "persistent-placeholder": ""
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(l(d), null, {
        default: u(() => [
          n(l(i), {
            modelValue: e.value.max,
            "onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.max = o),
            modelModifiers: { number: !0 },
            label: l(r)("datahub-plugin.textField.maxLength"),
            type: "number",
            readonly: a.readonly,
            "persistent-placeholder": ""
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(l(d), null, {
        default: u(() => [
          n(l(i), {
            modelValue: e.value.rows,
            "onUpdate:modelValue": t[2] || (t[2] = (o) => e.value.rows = o),
            modelModifiers: { number: !0 },
            label: l(r)("datahub-plugin.textField.rows"),
            type: "number",
            readonly: a.readonly,
            "persistent-placeholder": ""
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(l(d), null, {
        default: u(() => [
          n(l(i), {
            modelValue: e.value.regex,
            "onUpdate:modelValue": t[3] || (t[3] = (o) => e.value.regex = o),
            label: l(r)("datahub-plugin.textField.regex"),
            readonly: a.readonly,
            "persistent-placeholder": ""
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(l(d), null, {
        default: u(() => [
          n(l(s), {
            modelValue: e.value.isEditor,
            "onUpdate:modelValue": t[4] || (t[4] = (o) => e.value.isEditor = o),
            label: l(r)("datahub-plugin.textField.isEditor"),
            readonly: a.readonly
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(l(d), null, {
        default: u(() => [
          n(l(s), {
            modelValue: e.value.readOnly,
            "onUpdate:modelValue": t[5] || (t[5] = (o) => e.value.readOnly = o),
            label: a.$t("datahub-ui.dh-table.readOnly"),
            readonly: a.readonly
          }, null, 8, ["modelValue", "label", "readonly"])
        ]),
        _: 1
      }),
      n(h, {
        modelValue: e.value.badwords,
        "onUpdate:modelValue": t[6] || (t[6] = (o) => e.value.badwords = o),
        scopable: a.attribute?.scopable ?? a.dataTypeInstance.scopable,
        "remote-scopes": a.remoteScopes,
        "multi-language": a.attribute?.multilanguage ?? a.dataTypeInstance.multilanguage,
        "remote-languages": a.remoteLanguages,
        readonly: a.readonly
      }, null, 8, ["modelValue", "scopable", "remote-scopes", "multi-language", "remote-languages", "readonly"])
    ], 64));
  }
});
function p(m) {
  const e = m;
  e.__i18n = e.__i18n || [], e.__i18n.push({
    locale: "",
    resource: {
      "en-US": {
        "datahub-plugin": {
          textField: {
            rows: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Rows" } },
            isEditor: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "HTML Editor" } },
            minLength: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Min. length" } },
            maxLength: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Max. length" } },
            regex: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Regex" } }
          }
        }
      },
      "de-DE": {
        "datahub-plugin": {
          textField: {
            rows: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Zeilen" } },
            isEditor: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "HTML-Editor" } },
            minLength: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Min. Länge" } },
            maxLength: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Max. Länge" } },
            regex: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Regulärer Ausdruck (Regex)" } }
          }
        }
      }
    }
  });
}
typeof p == "function" && p(w);
export {
  w as default
};
