import { jsx as e, Fragment as l, jsxs as n } from "react/jsx-runtime";
import { useState as c } from "react";
import { M as d, a as _ } from "../../../../index-JtU1DT1I.js";
import { useManagementFilter as u } from "../../context/useCases.js";
import a from "../../../../composables/FunctionalComponents.js";
import { cn as f } from "../../../../utils/functions.js";
import { RenderEach as h } from "../../../../utils/components/RenderEach.js";
import "../../../../index-XF2mSoW7.js";
import "../../../../_commonjsHelpers-2ufMB8rV.js";
import "react-dom";
import "../../context/index.js";
import "../../../../context/index.js";
import "../../hooks/usePaginationSelector.js";
import "../../../../hooks/useDebounce.js";
import "../../../../index-OHO5PlsB.js";
import "../../../../utils/components/RenderIf.js";
import "../../../Icons.js";
import "../../../../clsx-7d8NmkQq.js";
import "../../../Inputs/variants.js";
import "../../../../index-xVF7D3FM.js";
import "../../../../motion-dVICNqWI.js";
import "../../../../SVGVisualElement-aqO4D4Z5.js";
import "../../../../LayoutGroupContext-3euHzeKi.js";
const z = (t) => t.type === "select" ? /* @__PURE__ */ e(x, { options: t.options }) : /* @__PURE__ */ e(a.InputSearch, { callBack: () => {
}, className: "_pb-4" }), x = ({ options: t = [{ params: "", label: "" }] }) => {
  const [r, m] = c(t[0].params), { getCurrentFiltValue: p, simpleSetFilter: s } = u();
  return r ? /* @__PURE__ */ n("div", { className: "_inline-flex _gap-3 _w-full _pb-4 _mt-2", children: [
    /* @__PURE__ */ e(
      d,
      {
        menuButton: /* @__PURE__ */ n("div", { className: "_inline-flex _gap-2 _items-center _text-secondaryDisabled _cursor-pointer _min-w-max _font-main", children: [
          "Filtro por ",
          /* @__PURE__ */ e("p", { className: "_underline _max-w-[140px] _overflow-hidden _text-ellipsis _whitespace-nowrap", children: "Código" })
        ] }),
        transition: !0,
        children: /* @__PURE__ */ e(
          h,
          {
            of: t,
            render: ({ label: i, params: o }) => /* @__PURE__ */ e(
              _,
              {
                children: i,
                className: f({ "!_bg-secondary/70 _text-white hover:!_bg-secondary/70": o === r }),
                onClick: () => {
                  m(o);
                }
              },
              o
            )
          }
        )
      }
    ),
    /* @__PURE__ */ e(
      a.InputSearch,
      {
        callBack: (i) => {
          s(r, "contains", "text", i);
        },
        value: p(r)
      }
    )
  ] }) : /* @__PURE__ */ e(l, { children: "Oops, no tiene opciones asignadas" });
};
export {
  z as default
};
