import { defineComponent as m, computed as a, openBlock as p, createElementBlock as d, createElementVNode as c, createVNode as f, unref as l, isRef as v, createCommentVNode as y } from "vue";
import { useProxiedModel as V } from "@feedmepos/ui-library";
import { useCoreStore as g, CustomAttributesForm as C } from "@feedmepos/mf-common";
const S = {
  key: 0,
  class: "flex flex-col gap-16"
}, x = /* @__PURE__ */ m({
  __name: "FmCustomAttribute",
  props: {
    entity: {},
    modelValue: {},
    valueOptions: {}
  },
  setup(s) {
    const r = s, o = V(r, "modelValue"), u = g(), i = a(() => {
      var t, e;
      return ((e = (t = u.currentBusiness.value) == null ? void 0 : t.attributeSettings) == null ? void 0 : e.filter(
        (n) => String(n.entity) === String(r.entity)
      )) || [];
    });
    return (t, e) => i.value.length ? (p(), d("div", S, [
      e[1] || (e[1] = c("div", { class: "fm-typo-en-title-sm-600" }, "Custom attributes", -1)),
      f(l(C), {
        entity: t.entity,
        modelValue: l(o),
        "onUpdate:modelValue": e[0] || (e[0] = (n) => v(o) ? o.value = n : null),
        "value-options": t.valueOptions
      }, null, 8, ["entity", "modelValue", "value-options"])
    ])) : y("", !0);
  }
});
export {
  x as _
};
