import { jsx as n } from "react/jsx-runtime";
import { useMemo as y } from "react";
import { B as x } from "../button/button.js";
import { c as h, s as N, a as A, m as B, b as v } from "../tools/tools.js";
const C = function(t) {
  const {
    as: l = "div",
    buttonProps: s,
    children: i,
    className: a,
    collapsed: e,
    dropOldClass: o,
    style: r,
    variables: c,
    ...d
  } = t, m = y(() => {
    const p = h(!o && "accordion-header h2", a), f = N((O, u) => ({ tKey: A(u) }), c, r);
    return {
      className: p,
      style: f
    };
  }, [a, o, r, c]);
  return /* @__PURE__ */ n(l, { ...d, ...m, children: /* @__PURE__ */ n(
    x,
    {
      "aria-expanded": e ? "false" : "true",
      ...B(s, {
        className: v(null, s == null ? void 0 : s.className, "accordion-button", e && "collapsed")
      }),
      children: i
    }
  ) });
};
C.displayName = "BRL.AccordionHeader";
export {
  C as A
};
//# sourceMappingURL=accordion-header.js.map
