import { j as e } from "../../../../_virtual/jsx-runtime.js";
import { useRef as a, useEffect as d } from "react";
import { Button as r } from "../../../Button/index.js";
import { useKeyPress as p } from "../../../../hooks/useKeyPress.js";
import { Wrapper as l } from "./styles.js";
import { previousMonthButton as h } from "../header/index.js";
function b({
  narrow: s = !1,
  dismissText: n,
  confirmText: i,
  onConfirm: m,
  onDismiss: u,
  "data-testid": c
}) {
  const t = a(null), f = p("Tab", t);
  return d(() => {
    if (t.current === document.activeElement) {
      const o = document.getElementsByClassName(h)[0];
      o && o.focus();
    }
  }, [f]), /* @__PURE__ */ e.jsxs(l, { narrow: s, "data-testid": c, children: [
    /* @__PURE__ */ e.jsx(r, { variant: "ghost", size: "medium", onClick: u, children: n }),
    /* @__PURE__ */ e.jsx(r, { size: "medium", onClick: m, ref: t, children: i })
  ] });
}
export {
  b as ActionButtons
};
