"use client";
import { j as t } from "../../../node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.mjs";
import "react";
import { ReactComponent as c } from "../../assets/images/AlertTriangle.svg.mjs";
import l from "../Button/index.mjs";
import "../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.mjs";
import "../Modal/ModalAnimation/index.module.scss.mjs";
import o from "../Modal/Modal/index.mjs";
import "../Modal/ModalSuccess/index.module.scss.mjs";
import n from "../TextInput/index.mjs";
import r from "./RemoveWalletModal.module.scss.mjs";
import { useForm as u } from "../../../node_modules/.pnpm/@mantine_form@7.17.8_react@19.1.0/node_modules/@mantine/form/esm/use-form.mjs";
function w({
  onConfirmed: s,
  i18n: e = {
    title: "Remove this wallet?",
    body: "This option is risky! Please ensure you backup your secret recovery phrase. If you don’t, you will lose access to your wallet. Are you sure you want to remove this wallet?",
    confirmButtonLabel: "Remove",
    cancelButtonLabel: "Cancel",
    inputLabel: "Type REMOVE to confirm",
    confirmationText: "REMOVE",
    errorLabel: "Sorry, please enter the text exactly as displayed to confirm."
  },
  ...m
}) {
  const a = u({
    initialValues: {
      confirmationText: ""
    },
    validate: {
      confirmationText: (i) => i === e.confirmationText ? null : e.errorLabel
    }
  });
  return /* @__PURE__ */ t.jsxs(
    o,
    {
      withCloseButton: !0,
      classNames: {
        root: r.root
      },
      ...m,
      children: [
        /* @__PURE__ */ t.jsx(o.HeadingIcon, { className: r.iconContainer, children: /* @__PURE__ */ t.jsx(c, { className: r.icon, width: 20, height: 20 }) }),
        /* @__PURE__ */ t.jsxs(o.Header, { children: [
          /* @__PURE__ */ t.jsx(o.Title, { children: e == null ? void 0 : e.title }),
          /* @__PURE__ */ t.jsx(o.Body, { className: "body-sm", children: e == null ? void 0 : e.body })
        ] }),
        /* @__PURE__ */ t.jsxs(
          "form",
          {
            className: r.form,
            onSubmit: a.onSubmit(() => {
              a.isValid() && s();
            }),
            children: [
              /* @__PURE__ */ t.jsx(
                n,
                {
                  error: a.errors.confirmationText,
                  label: e == null ? void 0 : e.inputLabel,
                  ...a.getInputProps("confirmationText")
                }
              ),
              /* @__PURE__ */ t.jsxs("div", { className: r.footer, children: [
                /* @__PURE__ */ t.jsx(l, { type: "primary", htmlType: "button", children: e == null ? void 0 : e.cancelButtonLabel }),
                /* @__PURE__ */ t.jsx(l, { type: "danger-tertiary", htmlType: "submit", children: e == null ? void 0 : e.confirmButtonLabel })
              ] })
            ]
          }
        )
      ]
    }
  );
}
export {
  w as default
};
//# sourceMappingURL=index.mjs.map
