'use strict';
import { getElementId } from '../../fd-toolbox/html/element-ids.js';
import { elementPrefixes } from '../../level2/meta/constants/element-prefixes.js';
import FiltersTestPage from '../../level2/client/pages/test-pages/FiltersTestPage.js';
import { elementSuffixes } from '../../fd-toolbox/constants/element-suffixes.js';
import { elements } from '../../fd-toolbox/constants/elements.js';
import { routes } from '../../fd-toolbox/routing/routes.js';
import { getUiTester } from '../ui-tester/global-ui-test.js';
import { ResourceFilterList } from '../../level2/meta/filtering/resource-filter-list/ResourceFilterList.js';
import { filterActionNames } from '../../base-repo/constants/internal-common-strings.js';

var __defProp=Object['defineProperty'],__name=(_0x49e4ee,_0x3bec5e)=>__defProp(_0x49e4ee,'name',{'value':_0x3bec5e,'configurable':!![]});async function filterPoGoToTestPage(){const _0x34b880=getUiTester(),_0x33a5dc=new URL(routes['testFilters'],_0x34b880['getBaseUrl']())['href'];await _0x34b880['goAndWait'](_0x33a5dc),await _0x34b880['waitForElementToLoad'](getElementId(FiltersTestPage['displayName']));}__name(filterPoGoToTestPage,'filterPoGoToTestPage');async function filterPoClickEraseButton(_0x78b732,_0x6d71f0=0xd4f*-0x2+0x577+0x1527){const _0x2f571a=getUiTester(),_0x29bd0f=filterPoGetResourceListId(_0x78b732,_0x6d71f0),_0x40fcba=filterPoGetResourceFilterListId(_0x29bd0f,0x1f34+0x1*-0x12d8+-0xe*0xe2),_0x23a8e7=filterPoGetFilterResetButtonId(_0x40fcba);await _0x2f571a['click'](_0x23a8e7);}__name(filterPoClickEraseButton,'filterPoClickEraseButton');async function filterPoSetInputFilterValue(_0x141c6c,_0x6d7959,_0x138274=-0x2124*0x1+0x141*0x4+0x1c20,_0x48dad0){const _0x5587b3=getUiTester(),_0x293d4d=filterPoGetResourceListId(_0x48dad0,_0x138274),_0x124cf3=filterPoGetResourceFilterListId(_0x293d4d,0x217b+0x1*-0x24cd+0x352),_0x3335a0=getElementId(_0x141c6c+elementSuffixes['filter'],_0x124cf3,_0x138274),_0x246df3=getElementId(elementSuffixes['button'],_0x3335a0);await _0x5587b3['click'](_0x246df3),await _0x5587b3['clearWithBackspacesAndSendKeys'](_0x3335a0,_0x6d7959);}__name(filterPoSetInputFilterValue,'filterPoSetInputFilterValue');async function filterPoSetDropdownFilterValue(_0x1ba44f,_0x1a35fa,_0x3b0cd2=0x115*-0xd+0x1*-0x1433+-0x1122*-0x2,_0x31c8a0){const _0x3c58d3=getUiTester(),_0xbf69c0=filterPoGetResourceListId(_0x31c8a0,_0x3b0cd2),_0x3c56f9=filterPoGetResourceFilterListId(_0xbf69c0,-0x23dc+0x1*0x19d1+-0xa0b*-0x1),_0x2825ff=getElementId(_0x1ba44f+elementSuffixes['filter'],_0x3c56f9,_0x3b0cd2),_0x2323ef=getElementId(elementSuffixes['button'],_0x2825ff),_0x48ca9d=elementPrefixes['selectItem']+_0x1a35fa;await _0x3c58d3['click'](_0x2323ef),await _0x3c58d3['click'](_0x48ca9d);}__name(filterPoSetDropdownFilterValue,'filterPoSetDropdownFilterValue');async function filterPoClickCollapseButton(_0x33e5b9,_0x3fdf68=-0x4*0x161+0x1*-0xb6a+0x10ee,_0x4583f7=0x75*-0x1+-0x8*0x4d7+-0x3*-0xd0f){const _0x1a9731=getUiTester(),_0x2c38fc=filterPoGetResourceListId(_0x33e5b9,_0x3fdf68),_0x1f59c9=filterPoGetResourceFilterListId(_0x2c38fc,_0x4583f7),_0x405d96=filterPoGetFilterCollapseButtonId(_0x1f59c9);await _0x1a9731['click'](_0x405d96);}__name(filterPoClickCollapseButton,'filterPoClickCollapseButton');async function filterPoGetVisibleFiltersCount(_0x5d9340,_0x394cd2=-0x30*0x4f+0x1*0x15b2+0x6e2*-0x1,_0x393cc5=-0x6d8+0x2b*0x14+0x1*0x37c){const _0x5407f4=getUiTester(),_0x3461f0=filterPoGetResourceListId(_0x5d9340,_0x394cd2),_0xa686d6=filterPoGetResourceFilterListId(_0x3461f0,_0x393cc5);await _0x5407f4['waitForElementToLoad'](_0xa686d6);const _0x35b8e1=_0x5407f4['page']['locator']('#'+_0xa686d6+'\x20>\x20*'),_0xe732f8=await _0x35b8e1['filter']({'visible':!![]})['count']();return _0xe732f8;}__name(filterPoGetVisibleFiltersCount,'filterPoGetVisibleFiltersCount');function filterPoGetResourceListId(_0x58a653,_0xb0404=0xa62+0x10d*-0x1d+-0x8b*-0x25){return getElementId(elements['resourceList']['resourceListId'],_0x58a653,_0xb0404);}__name(filterPoGetResourceListId,'filterPoGetResourceListId');function filterPoGetResourceFilterListId(_0x3a37a2,_0x261e22){return getElementId(ResourceFilterList['displayName'],_0x3a37a2??'',_0x261e22);}__name(filterPoGetResourceFilterListId,'filterPoGetResourceFilterListId');function filterPoGetFilterCollapseButtonId(_0x506864){return getElementId(filterActionNames['collapse']+elementSuffixes['button'],_0x506864);}__name(filterPoGetFilterCollapseButtonId,'filterPoGetFilterCollapseButtonId');function filterPoGetFilterResetButtonId(_0x128326){return getElementId(filterActionNames['reset']+elementSuffixes['button'],_0x128326);}__name(filterPoGetFilterResetButtonId,'filterPoGetFilterResetButtonId');

export { filterPoClickCollapseButton, filterPoClickEraseButton, filterPoGetFilterCollapseButtonId, filterPoGetFilterResetButtonId, filterPoGetResourceFilterListId, filterPoGetResourceListId, filterPoGetVisibleFiltersCount, filterPoGoToTestPage, filterPoSetDropdownFilterValue, filterPoSetInputFilterValue };
