import { defineComponent as s, mergeModels as p, useModel as f, watch as y, createBlock as g, openBlock as V, unref as b } from "vue";
import { useI18n as c } from "vue-i18n";
import { u as B, c as E } from "./start-BYfL32Oe.mjs";
import "pinia";
import "vue-router";
import "./header-Droxy2Kd.mjs";
import "./moment-h96o7c8I.mjs";
import { S as v } from "./constants-CwfsvyFM.mjs";
import { g as N } from "./utils-PF9w8IEt.mjs";
const U = /* @__PURE__ */ s({
  __name: "DatahubDataTypeBooleanValueEditor",
  props: /* @__PURE__ */ p({
    modelValue: { type: Boolean },
    readOnly: { type: Boolean },
    attribute: {},
    massEditing: { type: Boolean },
    label: {},
    fieldName: {},
    dataTypeInstance: {},
    loading: { type: Boolean }
  }, {
    modelValue: { type: Boolean },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(a) {
    const t = a, o = f(a, "modelValue"), { t: i } = c(), { root: d, dispatchEvent: m } = B(v);
    return y(
      o,
      (e) => m({
        data: {
          asString: i(N(e)),
          asValue: e,
          attribute: t.attribute,
          fieldName: t.fieldName
        }
      })
    ), (e, l) => {
      var n, r;
      return V(), g(b(E), {
        ref_key: "root",
        ref: d,
        modelValue: o.value,
        "onUpdate:modelValue": l[0] || (l[0] = (u) => o.value = u),
        readonly: ((r = (n = e.attribute) == null ? void 0 : n.configuration) == null ? void 0 : r.readOnly) || e.readOnly,
        label: e.massEditing ? void 0 : e.label,
        loading: e.loading
      }, null, 8, ["modelValue", "readonly", "label", "loading"]);
    };
  }
});
export {
  U as default
};
