import { jsx as t } from "react/jsx-runtime";
import { useLoadJsxFiles as n } from "./hooks/useLoadFiles.js";
import { Q as f } from "./useQuery-n4ls1rLk.js";
import { J as s } from "./react-jsx-parser.min-PKxwP4S0.js";
import a from "./components/Buttons/index.js";
import d from "./components/Card/index.js";
import { AppFormProvider as h } from "./components/FormProvider.js";
import c from "./components/Layouts.js";
import g from "./composables/FormInputs.js";
import { ActivitiesCards as x } from "./composables/govco/CardActivities.js";
import { FeatureComponents as C } from "./feature/index.js";
import { GeneralStoreProvider as b, useGeneralForm as e } from "./context/generalContext/index.js";
import { staticOptions as F } from "./config/index.js";
import { Q as P } from "./index-5sPke2Og.js";
import "react";
import "./index.esm-Jcyi89ZF.js";
import "./_commonjsHelpers-2ufMB8rV.js";
import "./index.esm-BQxOvVZs.js";
import "./components/Icons.js";
import "./utils/functions.js";
import "./clsx-7d8NmkQq.js";
import "./components/Buttons/variants.js";
import "./index-xVF7D3FM.js";
import "./utils/components/RenderIf.js";
import "./components/Card/variants.js";
import "./composables/Modal.js";
import "./hooks/useAnimatePresence.js";
import "./SVGVisualElement-aqO4D4Z5.js";
import "./use-unmount-effect-Wy5iLAex.js";
import "./components/AlertDialog/index.js";
import "react-dom";
import "./components/AlertDialog/variants.js";
import "./index-T7wQHOux.js";
import "./LayoutGroupContext-3euHzeKi.js";
import "./feature/govco/FormModal.js";
import "./feature/RenderFeatureComponents.js";
import "./hooks/useHasNextSiblingByAttribute.js";
import "./index-20bzTFSx.js";
import "./utils/components/RenderEach.js";
import "./components/Inputs/variants.js";
import "./motion-dVICNqWI.js";
import "./feature/govco/ActivityModal.js";
import "./feature/govco/DirectionModal.js";
import "./components/Maps/index.js";
import "./hooks/useDeepCompareEffect.js";
import "./feature/SelectMunicipality.js";
import "./context/index.js";
import "./axios-f2q_J-wz.js";
import "./components/Table/components/Basic.js";
import "./components/Table/context/index.js";
import "./components/Table/utils/useTableInfoRest.js";
import "./components/Table/components/Elements.js";
import "./dayjs.min-KYonM6tp.js";
import "./components/Table/components/TdComponents/WrapperTableTdComponents.js";
import "./components/Table/components/variants.js";
import "./components/Table/components/Filters.js";
import "./hooks/useClickOutside.js";
import "./components/Table/context/useCases.js";
import "./components/Table/hooks/usePaginationSelector.js";
import "./components/Table/hooks/useHandleInputWithTimer.js";
import "./components/Table/components/TableStatesComponents.js";
import "./components/Table/components/HeaderComponents/QuickSearch.js";
import "./index-CfwdJLFE.js";
import "./composables/FunctionalComponents.js";
import "./hooks/useDebounce.js";
const _r = ({
  config: m,
  queryConfig: o,
  formString: p,
  submitCallback: i,
  cancelCallback: r,
  formSchema: l
}) => {
  const u = new P(o);
  return /* @__PURE__ */ t(f, { client: u, children: /* @__PURE__ */ t(b, { defaultValue: { mainConfig: m, formString: p, submitCallback: i, cancelCallback: r, formSchema: l }, children: /* @__PURE__ */ t(j, {}) }) });
}, S = () => {
  const [m] = e((r) => r.formString), { jsx: o, isPending: p, error: i } = n();
  return console.log("jsx, isPending, error", o, p, i), !p && !o && !m ? /* @__PURE__ */ t("h4", { children: "No existe configuración" }) : o ? i ? /* @__PURE__ */ t("h1", { className: "_text-red-600", children: i.message }) : (
    //@ts-ignore
    /* @__PURE__ */ t(
      s,
      {
        bindings: { age: 2023, staticOptions: F },
        components: { FormInput: g, Layouts: c, Buttons: a, Card: d, ActivitiesCards: x, FeatureComponents: C },
        jsx: o || m
      }
    )
  ) : /* @__PURE__ */ t("h4", { children: "Loading (No JSX)" });
}, j = () => {
  const { validationScheme: m } = n(), [o] = e((r) => r.submitCallback), [p] = e((r) => r.formSchema), [i] = e((r) => r.cancelCallback);
  return (
    //@ts-ignore
    /* @__PURE__ */ t(
      s,
      {
        bindings: {
          submit: (r) => {
            o && o(r);
          },
          schema: m || p,
          cancelCallback: i
        },
        components: { AppFormProvider: h, Inputs: S, Buttons: a, Layouts: c },
        jsx: (
          /*jsx*/
          `
                <>
                    <AppFormProvider defaultValue={initialValues} className="_py-[8px]" submit={submit} schema={schema}>
                      <Inputs/>
                    </AppFormProvider>
                </>
          `
        )
      }
    )
  );
};
export {
  S as FormJsonContent,
  j as FormJsonMainLayout,
  _r as Formjson
};
