import cloneDeep$1 from "../../node_modules/lodash-es/cloneDeep.mjs";
function cloneDeep(data) {
  return cloneDeep$1(data);
}
const loadComponentByPath = (path, router) => {
  var _a;
  const route = router == null ? void 0 : router.getRoutes().find((item) => item.path === path);
  if (!route) return null;
  const comp = ((_a = route.components) == null ? void 0 : _a.default) || route.component;
  if (!comp) return null;
  if (typeof comp === "function") {
    return comp().then((module) => module.default);
  }
  return comp;
};
export {
  cloneDeep,
  loadComponentByPath
};
