import { jsx as t, Fragment as f, jsxs as a } from "react/jsx-runtime";
import g, { useCallback as l } from "react";
import { operatorTextObject as x } from "../../types/FilterConditionOperator.js";
import h from "../../types/FilterLogicalOperator.js";
import m from "../../../../../box/Box.js";
import b from "../../../../../text/Text.js";
import v from "../../../../../icon/Icon.js";
const C = ({ conditions: c, columns: o, onRemoveCondition: s }) => {
  const n = l(
    (e) => {
      const r = o.find((d) => d.key === e.column.key);
      if (!r) return "";
      const p = r.title, u = x[e.operator];
      return `${p} ${u} "${e.value}"`;
    },
    [o]
  ), i = l((e) => e === h.And ? "und" : "oder", []);
  return /* @__PURE__ */ t(f, { children: c.map((e, r) => /* @__PURE__ */ a(g.Fragment, { children: [
    r > 0 && /* @__PURE__ */ t(m, { className: "text-sm text-[var(--base-foreground)]", children: i(e.logicalOperator) }),
    /* @__PURE__ */ a(m, { className: "flex items-center gap-2 border border-[var(--base-border)] rounded-md h-[var(--height-h-9)] px-3", children: [
      /* @__PURE__ */ t(b, { type: "small", weight: "regular", children: n(e) }),
      /* @__PURE__ */ t(v, { "aria-label": "Remove condition", className: "cursor-pointer", name: "X", onClick: () => s(r), size: 16 })
    ] })
  ] }, `condition-${e.column.key}-${e.operator}-${e.value}-${r}`)) });
};
export {
  C as default
};
//# sourceMappingURL=AdvancedFilterDisplay.js.map
