import { jsx as e, Fragment as m, jsxs as a } from "react/jsx-runtime";
import { useState as p } from "react";
import { M as d, a as _ } from "../../../../index-OZv2tWWT.js";
import { useManagementFilter as u } from "../../context/useCases.js";
import o from "../../../../composables/FunctionalComponents.js";
import { cn as f } from "../../../../utils/functions.js";
import { RenderEach as h } from "../../../../utils/components/RenderEach.js";
const S = (t) => t.type === "select" ? /* @__PURE__ */ e(x, { options: t.options }) : /* @__PURE__ */ e(o.InputSearch, { callBack: () => {
}, className: "_pb-4" }), x = ({ options: t = [{ params: "", label: "" }] }) => {
  const [n, s] = p(t[0].params), { getCurrentFiltValue: l, simpleSetFilter: c } = u();
  return n ? /* @__PURE__ */ a("div", { className: "_inline-flex _gap-3 _w-full _pb-4 _mt-2", children: [
    /* @__PURE__ */ e(
      d,
      {
        menuButton: /* @__PURE__ */ a("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: r, params: i }) => /* @__PURE__ */ e(
              _,
              {
                children: r,
                className: f({ "!_bg-secondary/70 _text-white hover:!_bg-secondary/70": i === n }),
                onClick: () => {
                  s(i);
                }
              },
              i
            )
          }
        )
      }
    ),
    /* @__PURE__ */ e(
      o.InputSearch,
      {
        callBack: (r) => {
          c(n, "contains", "text", r);
        },
        value: l(n)
      }
    )
  ] }) : /* @__PURE__ */ e(m, { children: "Oops, no tiene opciones asignadas" });
};
export {
  S as default
};
