'use strict';
import { getAllInternalResourceMetas } from '../../../../meta/server/resources/internal-resource-meta.js';
import { getResourceMeta } from '../../../../meta/server/services/metas.js';
import { getResourceProperties, createResourcePropertyDirectlyInDb } from '../resources/resource-property-db.js';
import { getObjectValues } from '../../../../../fd-toolbox/lib/utils.js';

var __defProp=Object['defineProperty'],__name=(_0x2f2292,_0x58d4d5)=>__defProp(_0x2f2292,'name',{'value':_0x58d4d5,'configurable':!![]});async function seedResourcePropertiesDirectlyInDb(){const _0x1b39af=await getAllInternalResourceMetas(),_0x44556f=Array['from'](Object['values'](_0x1b39af)),_0x435e32=await getResourceProperties(),_0x42c428=_0x435e32['map'](_0x574873=>_0x574873['id']);for(const _0xef561 of _0x44556f){const _0x246163=await getResourceMeta(_0xef561['name']),_0x24c566=_0x246163?.['properties'];_0xef561['id']&&_0x24c566&&getObjectValues(_0x24c566)['filter'](_0x5b5f84=>!_0x42c428['includes'](_0x5b5f84['id']))['forEach'](_0xd43433=>{createResourcePropertyDirectlyInDb({'id':_0xd43433['id'],'name':_0xd43433['name'],'resourceId':_0xef561['id']});});}}__name(seedResourcePropertiesDirectlyInDb,'seedResourcePropertiesDirectlyInDb');

export { seedResourcePropertiesDirectlyInDb };
