"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { useT } from "@open-mercato/shared/lib/i18n/context";
import { translateWithFallback } from "@open-mercato/shared/lib/i18n/translate";
import { ChipButton } from "./ChipButton.js";
function FilterBarRow({
  leadingChips,
  chips,
  sortNode,
  onChipClick
}) {
  const t = useT();
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 rounded-lg bg-muted/40 px-3.5 py-3 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between sm:gap-y-2", children: [
    /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
      /* @__PURE__ */ jsxs("span", { className: "text-overline w-full font-bold uppercase leading-normal text-muted-foreground sm:w-auto", children: [
        translateWithFallback(t, "customers.deals.kanban.filter.label", "Filter"),
        ":"
      ] }),
      leadingChips,
      chips.map((chip) => /* @__PURE__ */ jsx(
        ChipButton,
        {
          label: chip.label,
          value: chip.value,
          onClick: () => onChipClick(chip.id),
          ariaLabel: translateWithFallback(
            t,
            "customers.deals.kanban.filter.aria.chip",
            "Filter by {label}",
            { label: chip.label }
          )
        },
        chip.id
      ))
    ] }),
    /* @__PURE__ */ jsx("div", { className: "sm:ml-auto", children: sortNode })
  ] });
}
var FilterBarRow_default = FilterBarRow;
export {
  FilterBarRow,
  FilterBarRow_default as default
};
//# sourceMappingURL=FilterBarRow.js.map
