'use strict';
import { createPropertyMeta } from '../../../level2/meta/core/property-meta.js';
import { resourceNames } from '../../../fd-toolbox/resources/resource-names.js';
import { createRelationConstructor } from '../../../level2/meta/core/relation.js';
import { createManyToManyInfo } from '../../../level2/meta/relations/many-to-many-info.js';
import { getUserFriendlyName } from '../../../level2/meta/server/props/property-names.js';
import { relationTypes, propertyTypes, fileUploadTypes } from '../../../fd-toolbox/enums/enums.js';
import { phoneBrandProps } from '../../../level2/common/dev/props/phone-brand-props.js';
import { personToJobProps } from '../../../level2/common/dev/props/person-to-job-props.js';
import { friendProps } from '../../../level2/common/dev/props/friend-props.js';
import { personToPersonProps } from '../../../level2/common/dev/props/person-to-person-props.js';
import { personProps } from '../../../level2/common/dev/props/person-props.js';
import { propertyTypeFormats } from '../../../level2/meta/constants/property-type-formats.js';
import { withIdProps } from '../../../fd-toolbox-core/types/resource-with-id.js';

var __defProp=Object['defineProperty'],__name=(_0xd94b46,_0x28e212)=>__defProp(_0xd94b46,'name',{'value':_0x28e212,'configurable':!![]});async function getPersonPropertyMetas(){const _0x30d0f3={};return await addTextProperties(_0x30d0f3),await addNumericProperties(_0x30d0f3),await addBooleanProperties(_0x30d0f3),await addPhoneBrandProperties(_0x30d0f3),await addWorkspaceProperties(_0x30d0f3),await addRelationshipProperties(_0x30d0f3),await addPersonToPersonProperty(_0x30d0f3),await addFriendListProperty(_0x30d0f3),await addDynamicProperties(_0x30d0f3),await addIdentityProperties(_0x30d0f3),_0x30d0f3;}__name(getPersonPropertyMetas,'getPersonPropertyMetas');async function createBasicProperty(_0x4497ac){return createPropertyMeta('',await getUserFriendlyName(_0x4497ac),_0x4497ac);}__name(createBasicProperty,'createBasicProperty');function createUserRelation(){const _0x333a1e=createRelationConstructor(withIdProps['id'],resourceNames['user'],relationTypes['manyToOne']);return _0x333a1e['pluralName']='Users',_0x333a1e;}__name(createUserRelation,'createUserRelation');async function addTextProperties(_0x2f75b5){let _0x44a627=await createBasicProperty(personProps['name']);_0x44a627['required']=!![],_0x44a627['ui']={'priority':0xc8},_0x2f75b5[_0x44a627['name']]=_0x44a627,_0x44a627=await createBasicProperty(personProps['lastName']),_0x44a627['isOutsideEditable']=![],_0x44a627['ui']={'priority':0x12c},_0x2f75b5[_0x44a627['name']]=_0x44a627,_0x44a627=await createBasicProperty(personProps['middleName']),_0x44a627['isDisplayable']=![],_0x44a627['isListDisplayAdvisable']=![],_0x2f75b5[_0x44a627['name']]=_0x44a627,_0x44a627=await createBasicProperty(personProps['description']),_0x44a627['typeFormat']=propertyTypeFormats['markdown'],_0x2f75b5[_0x44a627['name']]=_0x44a627,_0x44a627=await createBasicProperty(personProps['bio']),_0x44a627['typeFormat']=propertyTypeFormats['bigText'],_0x2f75b5[_0x44a627['name']]=_0x44a627,_0x44a627=await createBasicProperty(personProps['education']),_0x44a627['typeFormat']=propertyTypeFormats['bigText'],_0x2f75b5[_0x44a627['name']]=_0x44a627,_0x44a627=await createBasicProperty(personProps['imageUrl']),_0x44a627['type']=propertyTypes['string'],_0x2f75b5[_0x44a627['name']]=_0x44a627,_0x44a627=await createBasicProperty(personProps['profileImage']),_0x44a627['isBlobImage']=!![],_0x44a627['type']=propertyTypes['string'],_0x44a627['typeFormat']=propertyTypeFormats['blob'],_0x2f75b5[_0x44a627['name']]=_0x44a627,_0x44a627=await createBasicProperty(personProps['favoriteSong']),_0x44a627['fileUploadType']=fileUploadTypes['single'],_0x44a627['type']=propertyTypes['string'],_0x44a627['typeFormat']=propertyTypeFormats['binary'],_0x2f75b5[_0x44a627['name']]=_0x44a627,_0x44a627=await createBasicProperty(personProps['imageUrl']),_0x44a627['typeFormat']=propertyTypeFormats['url'],_0x44a627['isDisplayable']=![],_0x44a627['isListDisplayAdvisable']=![],_0x2f75b5[_0x44a627['name']]=_0x44a627;}__name(addTextProperties,'addTextProperties');async function addNumericProperties(_0x123f2e){let _0x3a8d62=await createBasicProperty(personProps['age']);_0x3a8d62['required']=!![],_0x3a8d62['type']=propertyTypes['integer'],_0x3a8d62['typeFormat']=propertyTypeFormats['int32'],_0x123f2e[_0x3a8d62['name']]=_0x3a8d62,_0x3a8d62=await createBasicProperty(personProps['favoriteNumber']),_0x3a8d62['type']=propertyTypes['integer'],_0x3a8d62['typeFormat']=propertyTypeFormats['int32'],_0x123f2e[_0x3a8d62['name']]=_0x3a8d62,_0x3a8d62=await createBasicProperty(personProps['numberOfFamilyMembers']),_0x3a8d62['type']=propertyTypes['integer'],_0x3a8d62['typeFormat']=propertyTypeFormats['int32'],_0x3a8d62['isOutsideEditable']=![],_0x3a8d62['isDisplayable']=![],_0x3a8d62['isListDisplayAdvisable']=![],_0x3a8d62['isOutsideExcluded']=!![],_0x123f2e[_0x3a8d62['name']]=_0x3a8d62,_0x3a8d62=await createBasicProperty(personProps['maritalStatus']),_0x3a8d62['typeFormat']=propertyTypeFormats['enum'],_0x3a8d62['type']=propertyTypes['integer'],_0x3a8d62['required']=!![],_0x3a8d62['enumerationDisplayName']=['Single','Married','Widowed'],_0x3a8d62['enumerationValues']=[-0x1d7b*-0x1+0x4*0x18d+0x69*-0x57,-0x1405+-0x1c17+-0x71*-0x6d,-0x21*-0xa1+0x1995+-0x2e54],_0x123f2e[_0x3a8d62['name']]=_0x3a8d62;}__name(addNumericProperties,'addNumericProperties');async function addBooleanProperties(_0xe7ed14){let _0xd0d542=await createBasicProperty(personProps['isMarried']);_0xd0d542['required']=!![],_0xd0d542['type']=propertyTypes['boolean'],_0xe7ed14[_0xd0d542['name']]=_0xd0d542,_0xd0d542=await createBasicProperty(personProps['hasKids']),_0xd0d542['type']=propertyTypes['boolean'],_0xe7ed14[_0xd0d542['name']]=_0xd0d542,_0xd0d542=await createBasicProperty(personProps['areKidsVaccinated']),_0xd0d542['type']=propertyTypes['boolean'],_0xd0d542['requiredIfOtherArePresent']=[personProps['hasKids']],_0xe7ed14[_0xd0d542['name']]=_0xd0d542,_0xd0d542=await createBasicProperty(personProps['firstbornName']),_0xd0d542['requiredIfOtherArePresent']=[personProps['hasKids']],_0xe7ed14[_0xd0d542['name']]=_0xd0d542;}__name(addBooleanProperties,'addBooleanProperties');async function addPhoneBrandProperties(_0x3bd40f){const _0x57502c=createRelationConstructor(withIdProps['id'],resourceNames['phoneBrand'],relationTypes['manyToOne']);_0x57502c['expandForDescription']=!![],_0x57502c['expandPropertyName']=personProps['phoneBrand'],_0x57502c['descriptionPropertyName']=phoneBrandProps['company'],_0x57502c['descriptionPropertyNames']=[phoneBrandProps['company']];let _0x57d4f8=await createBasicProperty(personProps['phoneBrandId']);_0x57d4f8['typeFormat']=propertyTypeFormats['uuid'],_0x57d4f8['relation']=_0x57502c,_0x3bd40f[_0x57d4f8['name']]=_0x57d4f8;const _0x493054=createRelationConstructor(withIdProps['id'],resourceNames['phoneBrand'],relationTypes['manyToOne']);_0x493054['expandPropertyName']=personProps['phoneBrand'],_0x493054['isExpandProperty']=!![],_0x57d4f8=await createBasicProperty(personProps['phoneBrand']),_0x57d4f8['type']=propertyTypes['object'],_0x57d4f8['isDisplayable']=![],_0x57d4f8['isListDisplayAdvisable']=![],_0x57d4f8['relation']=_0x493054,_0x3bd40f[_0x57d4f8['name']]=_0x57d4f8;}__name(addPhoneBrandProperties,'addPhoneBrandProperties');async function addWorkspaceProperties(_0x3832ec){const _0x2345e0=createRelationConstructor(withIdProps['id'],resourceNames['workspace'],relationTypes['manyToOne']);let _0x492452=await createBasicProperty(personProps['workspaceId']);_0x492452['required']=!![],_0x492452['typeFormat']=propertyTypeFormats['uuid'],_0x492452['isViewVisible']=!![],_0x492452['isDisplayable']=![],_0x492452['isListDisplayAdvisable']=![],_0x492452['relation']=_0x2345e0,_0x3832ec[_0x492452['name']]=_0x492452;const _0x3a0cc6=createRelationConstructor(withIdProps['id'],resourceNames['workspace'],relationTypes['manyToOne']);_0x3a0cc6['expandPropertyName']=personProps['workspace'],_0x3a0cc6['isExpandProperty']=!![],_0x492452=await createBasicProperty(personProps['workspace']),_0x492452['type']=propertyTypes['object'],_0x492452['isDisplayable']=![],_0x492452['isListDisplayAdvisable']=![],_0x492452['relation']=_0x3a0cc6,_0x3832ec[_0x492452['name']]=_0x492452;}__name(addWorkspaceProperties,'addWorkspaceProperties');async function addRelationshipProperties(_0x788831){const _0x1ffffa=createManyToManyInfo();_0x1ffffa['firstResourceName']=resourceNames['person'],_0x1ffffa['manyToManyFirstPropertyName']=personToJobProps['personId'],_0x1ffffa['manyToManyResourceName']=resourceNames['personToJob'],_0x1ffffa['manyToManySecondPropertyName']=personToJobProps['jobId'],_0x1ffffa['secondResourceName']=resourceNames['job'],_0x1ffffa['firstExpandPropertyName']=personToJobProps['person'],_0x1ffffa['secondExpandPropertyName']=personToJobProps['job'];const _0x5417f3=createRelationConstructor(friendProps['personId'],resourceNames['personToJob'],relationTypes['manyToMany']);_0x5417f3['isExpandProperty']=!![],_0x5417f3['expandPropertyName']=personProps['personToJobList'],_0x5417f3['relatedResourceRequiresRelation']=!![],_0x5417f3['manyToManyInfo']=_0x1ffffa,_0x5417f3['expandForDescription']=!![];let _0x4c45b5=await createBasicProperty(personProps['personToJobList']);_0x4c45b5['type']=propertyTypes['array'],_0x4c45b5['isListDisplayAdvisable']=!![],_0x4c45b5['relation']=_0x5417f3,_0x788831[_0x4c45b5['name']]=_0x4c45b5;}__name(addRelationshipProperties,'addRelationshipProperties');async function addPersonToPersonProperty(_0x181a53){const _0x11e844={'firstResourceName':resourceNames['person'],'manyToManyFirstPropertyName':personToPersonProps['firstPersonId'],'manyToManyResourceName':resourceNames['personToPerson'],'manyToManySecondPropertyName':personToPersonProps['secondPersonId'],'secondResourceName':resourceNames['person'],'firstExpandPropertyName':personToPersonProps['firstPerson'],'secondExpandPropertyName':personToPersonProps['secondPerson'],'isMirrorManyToManyResource':!![]},_0x1e00b5=createRelationConstructor(personToPersonProps['firstPersonId'],resourceNames['personToPerson'],relationTypes['manyToMany']);_0x1e00b5['relatedResourceRequiresRelation']=!![],_0x1e00b5['isExpandProperty']=!![],_0x1e00b5['expandPropertyName']=personProps['personToPersonList'],_0x1e00b5['relatedResourceName']=resourceNames['personToPerson'],_0x1e00b5['manyToManyInfo']=_0x11e844;const _0x8bf299=await createBasicProperty(personProps['personToPersonList']);_0x8bf299['type']=propertyTypes['array'],_0x8bf299['isListDisplayAdvisable']=![],_0x8bf299['relation']=_0x1e00b5,_0x8bf299['isOutsideEditable']=![],_0x8bf299['isOutsideExcluded']=!![],_0x8bf299['isDisplayable']=![],_0x181a53[_0x8bf299['name']]=_0x8bf299;}__name(addPersonToPersonProperty,'addPersonToPersonProperty');async function addFriendListProperty(_0x1a0722){const _0x549650=createRelationConstructor(friendProps['personId'],resourceNames['friend'],relationTypes['oneToMany']);_0x549650['isExpandProperty']=!![],_0x549650['expandPropertyName']=personProps['friendList'],_0x549650['relatedResourceRequiresRelation']=!![],_0x549650['expandForDescription']=!![],_0x549650['descriptionPropertyNames']=[friendProps['name']],_0x549650['descriptionPropertyName']=friendProps['name'];const _0x3c32fd=await createBasicProperty(personProps['friendList']);_0x3c32fd['type']=propertyTypes['array'],_0x3c32fd['isListDisplayAdvisable']=!![],_0x3c32fd['relation']=_0x549650,_0x1a0722[_0x3c32fd['name']]=_0x3c32fd;}__name(addFriendListProperty,'addFriendListProperty');async function addDynamicProperties(_0x462f67){let _0x1abd38=await createBasicProperty(personProps['friendCount']);_0x1abd38['isDynamic']=!![],_0x1abd38['type']=propertyTypes['number'],_0x1abd38['typeFormat']=propertyTypeFormats['double'],_0x462f67[_0x1abd38['name']]=_0x1abd38,_0x1abd38=await createBasicProperty(personProps['fullName']),_0x1abd38['isDynamic']=!![],_0x462f67[_0x1abd38['name']]=_0x1abd38;}__name(addDynamicProperties,'addDynamicProperties');async function addIdentityProperties(_0x1c6e98){const _0x2d702e=createUserRelation();let _0x347f65=await createBasicProperty(withIdProps['id']);_0x347f65['typeFormat']=propertyTypeFormats['uuid'],_0x347f65['isOutsideEditable']=!![],_0x347f65['isDisplayable']=!![],_0x347f65['isListDisplayAdvisable']=![],_0x1c6e98[_0x347f65['name']]=_0x347f65,_0x347f65=await createBasicProperty(personProps['userId']),_0x347f65['typeFormat']=propertyTypeFormats['uuid'],_0x347f65['isListDisplayAdvisable']=![],_0x347f65['relation']=_0x2d702e,_0x1c6e98[_0x347f65['name']]=_0x347f65,_0x347f65=await createBasicProperty(personProps['createdDate']),_0x347f65['typeFormat']=propertyTypeFormats['dateTime'],_0x347f65['isOutsideEditable']=![],_0x347f65['isDisplayable']=![],_0x347f65['isListDisplayAdvisable']=![],_0x1c6e98[_0x347f65['name']]=_0x347f65,_0x347f65=await createBasicProperty(personProps['createdByUserId']),_0x347f65['relation']=_0x2d702e,_0x347f65['isOutsideEditable']=![],_0x347f65['typeFormat']=propertyTypeFormats['uuid'],_0x347f65['isDisplayable']=![],_0x347f65['isListDisplayAdvisable']=![],_0x1c6e98[_0x347f65['name']]=_0x347f65,_0x347f65=await createBasicProperty(personProps['modifiedDate']),_0x347f65['isDisplayable']=![],_0x347f65['isListDisplayAdvisable']=![],_0x347f65['isOutsideEditable']=![],_0x347f65['typeFormat']=propertyTypeFormats['dateTime'],_0x1c6e98[_0x347f65['name']]=_0x347f65,_0x347f65=await createBasicProperty(personProps['modifiedByUserId']),_0x347f65['isOutsideEditable']=![],_0x347f65['isDisplayable']=![],_0x347f65['isListDisplayAdvisable']=![],_0x347f65['typeFormat']=propertyTypeFormats['uuid'],_0x347f65['relation']=_0x2d702e,_0x1c6e98[_0x347f65['name']]=_0x347f65;}__name(addIdentityProperties,'addIdentityProperties');

export { getPersonPropertyMetas };
