"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
const aws_amplify_1 = require("aws-amplify");
/**
 * Resend the user's account confirmation code
 * @param username
 * @returns result or undefined
 */
exports.OnResendSignup = (username) => __awaiter(this, void 0, void 0, function* () {
    if (!username) {
        return undefined;
    }
    const result = yield aws_amplify_1.Auth.resendSignUp(username);
    return result;
});
exports.default = exports.OnResendSignup;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJmaWxlIjoiL1VzZXJzL3Rob21hcy9Tb3VyY2UvcmVhY3QtbmF0aXZlLWNyb3NzLWNvZ25pdG8vc291cmNlL2V2ZW50cy9PblJlc2VuZFNpZ251cC50cyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsNkNBQW1DO0FBRW5DOzs7O0dBSUc7QUFDVSxRQUFBLGNBQWMsR0FBRyxDQUFPLFFBQWdCLEVBQUUsRUFBRTtJQUN2RCxJQUFJLENBQUMsUUFBUSxFQUFFO1FBQ2IsT0FBTyxTQUFTLENBQUM7S0FDbEI7SUFFRCxNQUFNLE1BQU0sR0FBRyxNQUFNLGtCQUFJLENBQUMsWUFBWSxDQUFDLFFBQVEsQ0FBQyxDQUFDO0lBQ2pELE9BQU8sTUFBTSxDQUFDO0FBQ2hCLENBQUMsQ0FBQSxDQUFDO0FBRUYsa0JBQWUsc0JBQWMsQ0FBQyIsIm5hbWVzIjpbXSwic291cmNlcyI6WyIvVXNlcnMvdGhvbWFzL1NvdXJjZS9yZWFjdC1uYXRpdmUtY3Jvc3MtY29nbml0by9zb3VyY2Uv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