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