'use strict';
import { getForgotPasswordEmailInputId, getForgotPasswordSendButtonId } from '../../level2/fd-app-toolbox/forgot-password-form/ForgotPasswordForm.funcs.js';
import { resetPasswordQueryParams } from '../../base-repo/constants/internal-query-constants.js';
import { elements } from '../../fd-toolbox/constants/elements.js';
import { routes } from '../../fd-toolbox/routing/routes.js';
import { apiPathNames } from '../../fd-toolbox/api/api-path-names.js';
import { testParams, testDataKeys } from '../../level2/server/test/data/test-constants.js';
import { httpGet, getObjectFromResponse } from '../test-data/integration-tests/http-client.js';
import { wellKnownUserProps } from '../../fd-toolbox/constants/common-user-fields.js';

var __defProp=Object['defineProperty'],__name=(_0x4ba662,_0x55e706)=>__defProp(_0x4ba662,'name',{'value':_0x55e706,'configurable':!![]});async function forgotPasswordPoSubmitForgotPasswordForm(_0xefe804,_0x1b104e){const _0x13baf2=getForgotPasswordEmailInputId(),_0x54d2d2=getForgotPasswordSendButtonId();await _0xefe804['goAndWait'](routes['login']),await _0xefe804['click'](elements['login']['forgotPasswordButton']),await _0xefe804['expectUrl'](routes['forgotPassword']),await _0xefe804['clearWithBackspacesAndSendKeys'](_0x13baf2,_0x1b104e),await _0xefe804['click'](_0x54d2d2);}__name(forgotPasswordPoSubmitForgotPasswordForm,'forgotPasswordPoSubmitForgotPasswordForm');async function forgotPasswordPoGetLastGeneratedPasswordResetToken(){const _0x394439=await httpGet(apiPathNames['testData'],[[testParams['key'],testDataKeys['lastForgotPasswordToken']]]),_0x1164aa=(await getObjectFromResponse(_0x394439))['data'];return _0x1164aa;}__name(forgotPasswordPoGetLastGeneratedPasswordResetToken,'forgotPasswordPoGetLastGeneratedPasswordResetToken');async function forgotPasswordPoGoToResetPasswordPage(_0x457430,_0x5b3e6c,_0x31e0ab){const _0x51241c='/'+routes['resetPassword']+'?'+resetPasswordQueryParams['code']+'='+_0x31e0ab+'&'+wellKnownUserProps['email']+'='+_0x5b3e6c;await _0x457430['goAndWait'](_0x51241c);}__name(forgotPasswordPoGoToResetPasswordPage,'forgotPasswordPoGoToResetPasswordPage');

export { forgotPasswordPoGetLastGeneratedPasswordResetToken, forgotPasswordPoGoToResetPasswordPage, forgotPasswordPoSubmitForgotPasswordForm };
