import { jsx as r, jsxs as e, Fragment as l } from "react/jsx-runtime";
import { useLoadFrmType as c, useLoadFiles as u, useGetParamsByQuery as d } from "./hooks/useLoadFiles.js";
import { Q as f } from "./useQuery-n4ls1rLk.js";
import { J as n } from "./react-jsx-parser.min-PKxwP4S0.js";
import a from "./components/Buttons/index.js";
import _ from "./components/Card/index.js";
import { AppFormProvider as h } from "./components/FormProvider.js";
import s from "./components/Layouts.js";
import F from "./composables/FormInputs.js";
import { ActivitiesCards as g } from "./composables/govco/CardActivities.js";
import { CardsSignatories as x } from "./composables/govco/CardSignatories.js";
import { FeatureComponents as C } from "./feature/index.js";
import { GeneralStoreProvider as v } from "./context/generalContext/index.js";
import { staticOptions as y } from "./config/index.js";
import { ConfigForm as N } from "./config.js";
import { Q as B } 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 Tr = ({ config: o, queryConfig: t }) => {
  const i = new B(t);
  return o.guid_form ? /* @__PURE__ */ r(f, { client: i, children: /* @__PURE__ */ r(v, { defaultValue: { mainConfig: o }, children: /* @__PURE__ */ r("div", { className: "_px-[60px] _pt-10 _pb-20 _bg-[#F2F2F2] _w-full _min-h-screen", children: /* @__PURE__ */ e("div", { className: "green__theme form__wrapper _max-w-7xl _mx-auto", children: [
    /* @__PURE__ */ r(N, {}),
    /* @__PURE__ */ r(w, {})
  ] }) }) }) }) : /* @__PURE__ */ r("h1", { className: "_text-red-600", children: "Por favor ingresar la configuración inicial" });
}, P = () => {
  const { configFrm: o, error: t, isPending: i } = c();
  return i ? /* @__PURE__ */ r("h4", { children: "Loading (Pending)" }) : t ? /* @__PURE__ */ r("h1", { className: "_text-red-600", children: t.message }) : o ? (
    //@ts-ignore
    /* @__PURE__ */ r(
      n,
      {
        bindings: { age: 2023, staticOptions: y, signatoriesUrl: "external/signatories" },
        components: { FormInput: F, Layouts: s, Buttons: a, Card: _, ActivitiesCards: g, CardsSignatories: x, FeatureComponents: C },
        jsx: o.jsx || ""
      }
    )
  ) : /* @__PURE__ */ r("h1", { className: "_text-red-600", children: "Opps, no se encontró una configuración" });
}, w = () => {
  const { validationScheme: o, isPending: t, error: i } = u(), { values: m } = d();
  return t ? /* @__PURE__ */ e(l, { children: [
    /* @__PURE__ */ r("div", { className: "loader _h-20 _w-full" }),
    /* @__PURE__ */ r("div", { className: "loader _h-10 _w-full _mt-2" }),
    /* @__PURE__ */ r("div", { className: "loader _h-40 _w-full _mt-2" }),
    /* @__PURE__ */ r("div", { className: "loader _h-80 _w-full _mt-2" }),
    /* @__PURE__ */ r("div", { className: "loader _h-80 _w-full _mt-2" }),
    /* @__PURE__ */ r("div", { className: "loader _h-10 _w-full _mt-2" })
  ] }) : i ? /* @__PURE__ */ r("h1", { className: "_text-red-600", children: i.message }) : o ? (
    //@ts-ignore
    /* @__PURE__ */ r(
      n,
      {
        bindings: {
          initialValues: { department: +(m == null ? void 0 : m.DptCod), municipality: m == null ? void 0 : m.MunCod },
          submit: (p) => {
            console.log("data", p);
          },
          schema: o
        },
        components: { AppFormProvider: h, Inputs: P, Buttons: a, Layouts: s },
        jsx: (
          /*jsx*/
          `
                <>
                    <Layouts.HeaderFormSection formConsecutive={10000202020020202} formNumber={300} formTitle="Formulario único nacional de declaración y pago del impuesto de industria y comercio" />
                    <AppFormProvider defaultValue={initialValues} className="_py-[8px]" submit={submit} schema={schema}>
                      <Inputs/>

                      <Layouts.FooterFormSection>
                          <Buttons.CancelButton>
                              Salir
                          </Buttons.CancelButton>

                          <div>
                              <Buttons.CheckFormButton>
                                  Revisar
                              </Buttons.CheckFormButton>

                              <Buttons.FormButton>
                                  Continuar
                              </Buttons.FormButton>
                          </div>
                      </Layouts.FooterFormSection>
                    </AppFormProvider>
                </>
          `
        )
      }
    )
  ) : /* @__PURE__ */ r("h1", { className: "_text-red-600", children: "Opps, no se encontraron" });
};
export {
  P as FormContent,
  w as FormMainLayout,
  Tr as FormString
};
