'use strict';
import { elementSuffixes } from '../../fd-toolbox/constants/element-suffixes.js';
import { routes } from '../../fd-toolbox/routing/routes.js';
import { elements } from '../../fd-toolbox/constants/elements.js';
import { auths } from '../../fd-toolbox-core/server/constants/auth-constants.js';
import { getUserDropdownMenuItemId } from '../../level2/fd-app-toolbox/menu/user-dropdown-menu/user-dropdown-menu-item/UserDropdownMenuItem.funcs.js';
import { getUserDropDownMenuTriggerId } from '../../level2/fd-app-toolbox/menu/user-dropdown-menu/UserDropdownMenu.funcs.js';
import { getUiTester } from '../ui-tester/global-ui-test.js';
import { metaTesterNavigateToResource } from '../asserters/navigation-asserts.js';
import { assertTableDataDisplayed } from '../asserters/table-asserts.js';

var __defProp=Object['defineProperty'],__name=(_0x29753e,_0x2a6b38)=>__defProp(_0x29753e,'name',{'value':_0x2a6b38,'configurable':!![]});async function loginPoLogin(_0x2944ff=auths['defaultEmail'],_0x1b9545=auths['defaultPwd']){const _0x47d4f2=getUiTester(),_0x33f9b6=new URL(routes['login'],_0x47d4f2['getBaseUrl']())['href'];await _0x47d4f2['goAndWait'](_0x33f9b6);const _0x489fa5=elements['login']['emailInput']+elementSuffixes['input'],_0x457b2b=elements['login']['passwordInput']+elementSuffixes['input'];await _0x47d4f2['clearWithBackspacesAndSendKeys'](_0x489fa5,_0x2944ff),await _0x47d4f2['clearWithBackspacesAndSendKeys'](_0x457b2b,_0x1b9545),await _0x47d4f2['clickLoginButton'](elements['login']['loginButton']),await _0x47d4f2['waitForDisappearFromUrl'](_0x33f9b6);}__name(loginPoLogin,'loginPoLogin');async function loginPoLoginAndGoToResourceList(_0x3405cb,_0x3cf3a6,_0x1688d5){await loginPoLogin(_0x3cf3a6,_0x1688d5),await metaTesterNavigateToResource(_0x3405cb),await assertTableDataDisplayed(_0x3405cb);}__name(loginPoLoginAndGoToResourceList,'loginPoLoginAndGoToResourceList');async function loginPoLogout(){const _0x11661c=getUiTester();await _0x11661c['click'](getUserDropDownMenuTriggerId(elements['toolbar'])),await _0x11661c['click'](getUserDropdownMenuItemId(elements['userDropdownMenu']['signOutButton']));}__name(loginPoLogout,'loginPoLogout');

export { loginPoLogin, loginPoLoginAndGoToResourceList, loginPoLogout };
