'use strict';
import { personProps } from '../../level2/common/dev/props/person-props.js';
import { getPreviewContentId } from '../../level2/fd-component-toolbox/markdown/Markdown.funcs.js';
import { booleanStringValues } from '../../base-repo/constants/type-string-values.js';
import { imageNotFoundSrc } from '../../fd-toolbox/constants/public-files.js';
import { getEditImageId } from '../../level2/meta/components/edit-image/EditImage.funcs.js';
import { getEditResourceId, getEditResourcePropertyId, getEditResourceBrowserInputId } from '../../level2/meta/edit-resource/EditResource.funcs.js';
import { browserTypes } from '../../level2/meta/browsers/browser-type.js';
import { uiAssertValue, uiAssertEqual, uiAssertInnerText, uiAssertCheckboxValue, uiAssertAttribute, uiAssertImage } from './ui-asserts.js';
import { getUiTester } from '../ui-tester/global-ui-test.js';
import { ensureNotNullOrUndefined } from '../../fd-toolbox/functions/value-checking-functions.js';
import { accessibilityAttributeNames } from '../../fd-toolbox/constants/html-constants.js';
import { expect } from 'playwright/test';

var __defProp=Object['defineProperty'],__name=(_0x4e8493,_0x42597b)=>__defProp(_0x4e8493,'name',{'value':_0x42597b,'configurable':!![]});async function editAssertInputValue(_0x30aac7,_0x54280a,_0x4d8cc1=0x2644+-0x258d+-0xb7){const _0xc3cc5f=getEditResourceId(),_0x77354e=getEditResourcePropertyId(_0x30aac7,_0xc3cc5f,_0x4d8cc1);await uiAssertValue(_0x77354e,_0x54280a);}__name(editAssertInputValue,'editAssertInputValue');async function editAssertMarkdownTextInsideTag(_0x2cae93,_0x3cd6e5,_0x20e3ce,_0x387e7c=-0x1cac+-0x1c19+-0x38c5*-0x1){const _0x1a18d7=getUiTester(),_0x279d4c=getEditResourceId(),_0x6ab307=getEditResourcePropertyId(_0x2cae93,_0x279d4c,_0x387e7c),_0x573c24=getPreviewContentId(_0x6ab307),_0xa954e=await _0x1a18d7['getChildElementWithinParent'](_0x573c24,_0x20e3ce);await uiAssertEqual(_0x3cd6e5,await _0xa954e['textContent']());}__name(editAssertMarkdownTextInsideTag,'editAssertMarkdownTextInsideTag');async function editAssertMarkdownHtmlElement(_0x2840cf,_0x3d0956,_0x41410e=-0x1*0x93f+-0x8c5+-0x4*-0x481){const _0x23f035=getUiTester(),_0x3a0933=getEditResourceId(),_0x116751=getEditResourcePropertyId(_0x2840cf,_0x3a0933,_0x41410e),_0x1964e4=getPreviewContentId(_0x116751);await _0x23f035['getChildElementWithinParent'](_0x1964e4,_0x3d0956);}__name(editAssertMarkdownHtmlElement,'editAssertMarkdownHtmlElement');async function editAssertMarkdownInputValue(_0xbb5d2a,_0x2995f5,_0x234bf6=0x68*-0x1f+-0x9e1+-0x1679*-0x1){const _0x54ca8e=getEditResourceId(),_0x4d2cd5=getEditResourcePropertyId(_0xbb5d2a,_0x54ca8e,_0x234bf6);await uiAssertInnerText(_0x4d2cd5,_0x2995f5);}__name(editAssertMarkdownInputValue,'editAssertMarkdownInputValue');async function editAssertCheckbox(_0x1b2b7b,_0x134541,_0x1700ed=0x3bb+0x1*0x202f+-0x23ea){const _0x2553d5=getEditResourceId(),_0x1bddcb=getEditResourcePropertyId(_0x1b2b7b,_0x2553d5,_0x1700ed);await uiAssertCheckboxValue(_0x1bddcb,_0x134541);}__name(editAssertCheckbox,'editAssertCheckbox');async function editAssertBrowserInputValue(_0x3e2616,_0x3466a9,_0x93895=-0x1422+-0x24*-0x21+0xf7e){const _0x247f9b=getEditResourceId(),_0x3a2d68=getEditResourceBrowserInputId(_0x3e2616,browserTypes['browser'],_0x247f9b,_0x93895);await uiAssertValue(_0x3a2d68,_0x3466a9);}__name(editAssertBrowserInputValue,'editAssertBrowserInputValue');async function editAssertManyToManyBrowserInputValue(_0x13c6bd,_0x4e75b4,_0x47519f=0x3*0x35b+-0x11*-0x7d+-0x125e*0x1){const _0x2a06e7=getEditResourceId(),_0x4fa392=getEditResourceBrowserInputId(_0x13c6bd,browserTypes['manyToManyBrowser'],_0x2a06e7,_0x47519f);await uiAssertValue(_0x4fa392,_0x4e75b4);}__name(editAssertManyToManyBrowserInputValue,'editAssertManyToManyBrowserInputValue');async function editAssertMultiBrowserInputValue(_0x3385ec,_0xa50927,_0x132b0a=-0xfe1+0xf89+-0x2c*-0x2){const _0x3b63c8=getEditResourceId(),_0x482342=getEditResourceBrowserInputId(_0x3385ec,browserTypes['multiBrowser'],_0x3b63c8,_0x132b0a);await uiAssertValue(_0x482342,_0xa50927);}__name(editAssertMultiBrowserInputValue,'editAssertMultiBrowserInputValue');async function editAssertRequiredField(_0x4a6b4b,_0x3cb5f8=-0x34*-0x19+0x652+-0x5b3*0x2){const _0x2b4df0=getEditResourceId(),_0x5bc1b5=getEditResourcePropertyId(_0x4a6b4b,_0x2b4df0,_0x3cb5f8);await uiAssertAttribute(_0x5bc1b5,accessibilityAttributeNames['ariaInvalid'],booleanStringValues['true']);}__name(editAssertRequiredField,'editAssertRequiredField');async function assertEditPersonProperlyDisplayed(_0x204ec1,_0x3b54a3,_0xb7e326,_0xd285c1){await editAssertInputValue(personProps['name'],_0x204ec1['name']),await editAssertInputValue(personProps['age'],_0x204ec1['age']['toString']()),await editAssertMarkdownInputValue(personProps['description'],ensureNotNullOrUndefined(_0x204ec1['description'])),await editAssertCheckbox(personProps['isMarried'],_0x204ec1['isMarried']),await editAssertInputValue(personProps['favoriteNumber'],_0x204ec1['favoriteNumber']?.['toString']()),await editAssertBrowserInputValue(personProps['phoneBrandId'],_0x3b54a3),await editAssertManyToManyBrowserInputValue(personProps['personToJobList'],_0xb7e326),await editAssertMultiBrowserInputValue(personProps['friendList'],_0xd285c1),await editAssertCheckbox(personProps['hasKids'],ensureNotNullOrUndefined(_0x204ec1['hasKids'])),await editAssertCheckbox(personProps['areKidsVaccinated'],ensureNotNullOrUndefined(_0x204ec1['areKidsVaccinated'])),await editAssertInputValue(personProps['firstbornName'],_0x204ec1['firstbornName']),await editAssertTextAreaInputValue(personProps['education'],_0x204ec1['education']),await editAssertTextAreaInputValue(personProps['bio'],_0x204ec1['bio']);const _0xc7039=getEditResourceId(0x44f*0x7+0x19fb+-0x3824),_0x4c7d6c=getEditImageId(_0xc7039);await uiAssertImage(_0x4c7d6c,_0x204ec1['imageUrl']??imageNotFoundSrc);}__name(assertEditPersonProperlyDisplayed,'assertEditPersonProperlyDisplayed');async function editAssertFieldIsVisible(_0x11a662,_0x3d9f51,_0x169f8f,_0x493f1e=-0x23dd+0xe7+-0xa*-0x37f){const _0x28b7d4=getUiTester(),_0x248ff9=getEditResourceId(),_0x1f68ef=getEditResourceBrowserInputId(_0x11a662,_0x3d9f51,_0x248ff9,_0x493f1e),_0x6e553=await _0x28b7d4['getById'](_0x1f68ef);await expect(_0x6e553)['toBeVisible']({'visible':_0x169f8f});}__name(editAssertFieldIsVisible,'editAssertFieldIsVisible');async function editAssertTextAreaInputValue(_0x350c6c,_0x5bc116,_0x15a852=0x7ba+0x336*0x5+-0x17c8){await editAssertMarkdownInputValue(_0x350c6c,ensureNotNullOrUndefined(_0x5bc116),_0x15a852);}__name(editAssertTextAreaInputValue,'editAssertTextAreaInputValue');

export { assertEditPersonProperlyDisplayed, editAssertBrowserInputValue, editAssertCheckbox, editAssertFieldIsVisible, editAssertInputValue, editAssertManyToManyBrowserInputValue, editAssertMarkdownHtmlElement, editAssertMarkdownInputValue, editAssertMarkdownTextInsideTag, editAssertMultiBrowserInputValue, editAssertRequiredField };
