import s, { useContext as u } from "react";
import f from "../../_util/ActionButton.mjs";
import { ModalContext as m } from "../context.mjs";
const C = () => {
  const {
    autoFocusButton: n,
    cancelButtonProps: e,
    cancelTextLocale: l,
    isSilent: c,
    mergedOkCancel: a,
    rootPrefixCls: i,
    close: o,
    onCancel: r,
    onConfirm: t
  } = u(m);
  return a ? /* @__PURE__ */ s.createElement(f, {
    isSilent: c,
    actionFn: r,
    close: function() {
      o == null || o.apply(void 0, arguments), t == null || t(!1);
    },
    autoFocus: n === "cancel",
    buttonProps: e,
    prefixCls: `${i}-btn`
  }, l) : null;
}, v = C;
export {
  v as default
};
