import { jsxs as l, jsx as s } from "react/jsx-runtime";
import { noop as g } from "es-toolkit/compat";
import b from "../../utils/classNames.js";
import h from "../selects/Select.js";
import c from "../button/ToggleButton.js";
const v = (i) => {
  const { sortName: m, sortOrder: t = "asc", selectOptions: a, onSortChange: r = g, className: e } = i, n = (o) => {
    r(m, o);
  }, p = (o) => {
    r(o, t);
  }, d = b("table-toolbar-cards-sorting", "btn-toolbar", e && e);
  return /* @__PURE__ */ l("div", { className: d, children: [
    /* @__PURE__ */ l("div", { className: "btn-group margin-left-0", children: [
      /* @__PURE__ */ s(
        c,
        {
          className: "btn-icon-only",
          active: t === "asc",
          onClick: () => n("asc"),
          children: /* @__PURE__ */ s("span", { className: "rioglyph rioglyph-sort-by-attributes-alt" })
        }
      ),
      /* @__PURE__ */ s(
        c,
        {
          className: "btn-icon-only",
          active: t === "desc",
          onClick: () => n("desc"),
          children: /* @__PURE__ */ s("span", { className: "rioglyph rioglyph-sort-by-attributes" })
        }
      )
    ] }),
    a.length && /* @__PURE__ */ s("div", { className: "btn-group", children: /* @__PURE__ */ s(h, { options: a, onChange: (o) => o && p(o.id) }) })
  ] });
};
export {
  v as default
};
//# sourceMappingURL=TableCardsSorting.js.map
