"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const Vue = require("vue");
const shared_esmBundler = require("../../../../../@vue/shared/dist/shared.esm-bundler.js");
const fromPairs = require("../../../../../lodash-es/fromPairs.js");
const u = "__epPropKey", h = (e) => e, y = (e) => shared_esmBundler.isObject(e) && !!e[u], O = (e, r) => {
  if (!shared_esmBundler.isObject(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 = false, i = [];
      if (o && (i = Array.from(o), shared_esmBundler.hasOwn(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(", ");
        Vue.warn(`Invalid prop: validation failed${r ? ` for prop "${r}"` : ""}. Expected one of [${m}], got value ${JSON.stringify(l)}.`);
      }
      return t;
    } : void 0,
    [u]: true
  };
  return shared_esmBundler.hasOwn(e, "default") && (f.default = n), f;
}, j = (e) => fromPairs.default(Object.entries(e).map(([r, o]) => [
  r,
  O(o, r)
]));
exports.buildProp = O;
exports.buildProps = j;
exports.definePropType = h;
exports.epPropKey = u;
exports.isEpProp = y;
