import i from "../../../@babel/runtime/helpers/esm/objectSpread2.mjs";
import r from "../../../@babel/runtime/helpers/esm/typeof.mjs";
import { warningOnce as o } from "../../../rc-util/es/warning.mjs";
import * as f from "react";
function p(t) {
  return f.useMemo(function() {
    if (!t)
      return [!1, {}];
    var e = {
      matchInputWidth: !0,
      limit: 50
    };
    return t && r(t) === "object" && (e = i(i({}, e), t)), e.limit <= 0 && (delete e.limit, process.env.NODE_ENV !== "production" && o(!1, "'limit' of showSearch should be positive number or false.")), [!0, e];
  }, [t]);
}
export {
  p as default
};
