import { warn as v } from "vue";
import { isObject as d, hasOwn as s } from "../../../../../../../@vue_shared@3.4.21/node_modules/@vue/shared/dist/shared.esm-bundler.mjs";
import w from "../../../../../../../lodash-es@4.17.21/node_modules/lodash-es/fromPairs.mjs";
const u = "__epPropKey", h = (e) => e, y = (e) => d(e) && !!e[u], O = (e, r) => {
  if (!d(e) || y(e))
    return e;
  const { values: o, required: p, default: n, type: c, validator: a } = e, f = {
    type: c,
    required: !!p,
    validator: o || a ? (l) => {
      let t = !1, i = [];
      if (o && (i = Array.from(o), s(e, "default") && i.push(n), t || (t = i.includes(l))), a && (t || (t = a(l))), !t && i.length > 0) {
        const m = [...new Set(i)].map((P) => JSON.stringify(P)).join(", ");
        v(`Invalid prop: validation failed${r ? ` for prop "${r}"` : ""}. Expected one of [${m}], got value ${JSON.stringify(l)}.`);
      }
      return t;
    } : void 0,
    [u]: !0
  };
  return s(e, "default") && (f.default = n), f;
}, j = (e) => w(Object.entries(e).map(([r, o]) => [
  r,
  O(o, r)
]));
export {
  O as buildProp,
  j as buildProps,
  h as definePropType,
  u as epPropKey,
  y as isEpProp
};
