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