import { defineComponent as y, mergeModels as f, useModel as V, createElementBlock as v, openBlock as L, Fragment as M, createVNode as n, unref as l, withCtx as u } from "vue";
import { useI18n as h } from "vue-i18n";
import { a as d, b as s, c as b } from "./start-BYfL32Oe.mjs";
import "pinia";
import "vue-router";
import "./header-Droxy2Kd.mjs";
import "./moment-h96o7c8I.mjs";
import { _ as x } from "./DatahubBadWordFilter-CBFumEik.mjs";
const w = /* @__PURE__ */ y({
  __name: "DatahubDataTypeTextFieldConfiguration",
  props: /* @__PURE__ */ f({
    attribute: {},
    dataTypeInstance: {},
    remoteScopes: {},
    remoteLanguages: {},
    remoteAttributes: {},
    readonly: { type: Boolean }
  }, {
    modelValue: {},
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(p) {
    const e = V(p, "modelValue", {
      set: ({ max: a, min: t, rows: i, isEditor: m, ...o }) => ({
        max: Number(a),
        min: Number(t),
        rows: Number(i),
        isEditor: !!m,
        ...o
      })
    }), { t: r } = h();
    return (a, t) => {
      var i, m;
      return L(), v(M, null, [
        n(l(d), null, {
          default: u(() => [
            n(l(s), {
              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(s), {
              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(s), {
              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(s), {
              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(b), {
              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(b), {
              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(x, {
          modelValue: e.value.badwords,
          "onUpdate:modelValue": t[6] || (t[6] = (o) => e.value.badwords = o),
          scopable: ((i = a.attribute) == null ? void 0 : i.scopable) ?? a.dataTypeInstance.scopable,
          "remote-scopes": a.remoteScopes,
          "multi-language": ((m = a.attribute) == null ? void 0 : m.multilanguage) ?? a.dataTypeInstance.multilanguage,
          "remote-languages": a.remoteLanguages,
          readonly: a.readonly
        }, null, 8, ["modelValue", "scopable", "remote-scopes", "multi-language", "remote-languages", "readonly"])
      ], 64);
    };
  }
});
function g(p) {
  const e = p;
  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" } }
          }
        }
      }
    }
  });
}
typeof g == "function" && g(w);
export {
  w as default
};
