import { defineComponent as m, openBlock as s, createElementBlock as r, createElementVNode as o, createTextVNode as a, toDisplayString as i, Fragment as u, renderList as p } from "vue";
const c = { class: "w-[400px] h-[100px]" }, f = { class: "font-bold text-neutral-500 mx-1" }, y = { class: "mt-3" }, x = /* @__PURE__ */ m({
  __name: "CannotDelete",
  props: {
    subject: {
      type: String
    },
    items: {
      type: Array,
      default: () => []
    }
  },
  setup(e) {
    return (n, t) => (s(), r("div", c, [
      o("div", null, [
        t[0] || (t[0] = a(" Cannot delete ")),
        o("span", f, i(e.subject), 1),
        t[1] || (t[1] = a(" because this unit is linked in these inventory items: "))
      ]),
      o("ol", y, [
        (s(!0), r(u, null, p(e.items, (l, d) => (s(), r("li", {
          class: "pl-5 font-bold text-neutral-500",
          key: d
        }, " • (" + i(l.module) + ") " + i(l.name), 1))), 128))
      ])
    ]));
  }
});
function _(e) {
  return e.errorResponse.error === "validation failed" && Array.isArray(e.errorResponse.message) && e.errorResponse.message.every(
    (n) => typeof n.module == "string" && typeof n.name == "string"
  );
}
export {
  x as _,
  _ as i
};
