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