import { jsx as r, jsxs as b } from "react/jsx-runtime";
import { forwardRef as y } from "react";
import { cx as g } from "../../utils/classNames.js";
import { useArrowTheme as C } from "../../hooks/useArrowTheme.js";
const N = {
  filter: "Filter by: ",
  sort: "Sort by: "
};
function _() {
  return /* @__PURE__ */ r(
    "svg",
    {
      width: "24",
      height: "24",
      viewBox: "0 0 24 24",
      fill: "currentColor",
      xmlns: "http://www.w3.org/2000/svg",
      children: /* @__PURE__ */ r("path", { d: "M17 9L12 15L7 9L17 9Z" })
    }
  );
}
const F = y(
  ({
    id: e,
    chipType: o,
    leadingIcon: s,
    caretIcon: a,
    selectedItem: t,
    showMenu: n,
    hasPopUp: l,
    inverse: p,
    focused: c,
    hover: d,
    pressed: f,
    className: h,
    ...m
  }, u) => {
    const x = C(), v = p ?? x.inverse, i = N[o] || "", w = t ? `${i}${t.text}` : i;
    return /* @__PURE__ */ r(
      "button",
      {
        ref: u,
        id: e,
        type: "button",
        className: g(
          "tdds-filter-chip",
          {
            "force-focus": !!c,
            "force-hover": !!d,
            "force-pressed": !!f
          },
          h
        ),
        ...v ? { "data-inverse": "true" } : {},
        "aria-controls": `${e}-menu`,
        "aria-expanded": n || void 0,
        "aria-haspopup": l ? "true" : void 0,
        ...m,
        children: /* @__PURE__ */ r("span", { className: "tdds-filter-chip__label--wrapper", children: /* @__PURE__ */ b("span", { className: "tdds-filter-chip__label", children: [
          s || null,
          /* @__PURE__ */ r("span", { children: w }),
          a ?? /* @__PURE__ */ r(_, {})
        ] }) })
      }
    );
  }
);
F.displayName = "FilterChip";
export {
  F as FilterChip
};
//# sourceMappingURL=FilterChip.js.map
