"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactHooks = require("@credo-ts/react-hooks");
var _native = require("@react-navigation/native");
var _react = _interopRequireWildcard(require("react"));
var _WalletNameForm = _interopRequireDefault(require("../components/forms/WalletNameForm"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
const RenameWallet = () => {
  const navigation = (0, _native.useNavigation)();
  const {
    agent
  } = (0, _reactHooks.useAgent)();
  const onCancel = (0, _react.useCallback)(() => {
    navigation.goBack();
  }, [navigation]);
  const onSubmitSuccess = (0, _react.useCallback)(name => {
    agent.config.label = name;
    navigation.goBack();
  }, [navigation, agent]);
  return /*#__PURE__*/_react.default.createElement(_WalletNameForm.default, {
    isRenaming: true,
    onCancel: onCancel,
    onSubmitSuccess: onSubmitSuccess
  });
};
var _default = exports.default = RenameWallet;
//# sourceMappingURL=RenameWallet.js.map