import s from "../../../classnames/index.mjs";
import * as i from "react";
function f(o) {
  return function(t) {
    let {
      prefixCls: p,
      onExpand: d,
      record: c,
      expanded: e,
      expandable: n
    } = t;
    const a = `${p}-row-expand-icon`;
    return /* @__PURE__ */ i.createElement("button", {
      type: "button",
      onClick: (r) => {
        d(c, r), r.stopPropagation();
      },
      className: s(a, {
        [`${a}-spaced`]: !n,
        [`${a}-expanded`]: n && e,
        [`${a}-collapsed`]: n && !e
      }),
      "aria-label": e ? o.collapse : o.expand,
      "aria-expanded": e
    });
  };
}
export {
  f as default
};
