import { jsxs as e } from "react/jsx-runtime";
import { forwardRef as A } from "react";
import { cx as w } from "../../utils/classNames.js";
import { useArrowTheme as y } from "../../hooks/useArrowTheme.js";
const B = A(
  ({
    children: o,
    expanded: r,
    size: t,
    inverse: s,
    monochrome: n = !1,
    ariaLabel: a,
    type: c,
    icon: d,
    focused: i,
    hover: m,
    pressed: f,
    className: u,
    onClick: p,
    ...l
  }, v) => {
    const h = y(), b = s ?? h.inverse;
    if (o === "")
      return null;
    const x = w(
      "tdds-button tdds-button--accordion",
      {
        "force-focus": !!i,
        "force-hover": !!m,
        "force-pressed": !!f
      },
      u
    );
    return /* @__PURE__ */ e(
      "button",
      {
        ref: v,
        type: c || void 0,
        className: x,
        "aria-expanded": !!r,
        "aria-label": a || void 0,
        ...b ? { "data-inverse": "true" } : {},
        "data-size": t || void 0,
        ...n ? { "data-monochrome": "true" } : {},
        onClick: p,
        ...l,
        children: [
          /* @__PURE__ */ e("span", { children: [
            " ",
            o,
            " "
          ] }),
          d
        ]
      }
    );
  }
);
B.displayName = "AccordionButton";
export {
  B as AccordionButton
};
//# sourceMappingURL=AccordionButton.js.map
