import { jsx as o, Fragment as s } from "react/jsx-runtime";
import { a as d } from "../useQuery-n4ls1rLk.js";
import "react";
const h = ({ componentKey: n, theme: r = "govco", ...a }) => {
  const {
    data: t,
    isLoading: c,
    isError: m,
    isFetched: p,
    isSuccess: u
  } = d({
    queryKey: ["dynamicComponent-Feature", r, n],
    queryFn: async () => await import("./index.js").then((e) => e == null ? void 0 : e.default)
  });
  if (!n)
    return /* @__PURE__ */ o(s, {});
  if (!(!c && !m && p && u) || !t)
    return /* @__PURE__ */ o(s, {});
  const i = t[r][n];
  return i ? /* @__PURE__ */ o(i, { ...a }) : /* @__PURE__ */ o("div", { children: "Error: Componente no encontrado" });
};
export {
  h as default
};
