'use strict';
import { apiGetWithOData } from '../../fd-toolbox/api/api-client.js';
import { getODataExpandIfExpandForDescription } from './odata/expands.js';
import { getRelatedResourcesMetasIfExpandForDescription, getODataSelectIfExpandForDescription } from './odata/odata-selects.js';
import { oDataOperators } from '../../fd-toolbox/enums/enums.js';
import { ODataBuilder } from '../../fd-toolbox/odata/odata-builders.js';

var __defProp=Object['defineProperty'],__name=(_0x2d4325,_0x4739b4)=>__defProp(_0x2d4325,'name',{'value':_0x4739b4,'configurable':!![]});async function fetchRelatedResourcesList(_0x20652f,_0x1361bc,_0x4e5db8){const _0x325be0=new ODataBuilder()['filterUuid'](_0x20652f['relation']['relatedPropertyName'],_0x4e5db8,oDataOperators['in']);if(_0x1361bc){const _0x2c867a=await getRelatedResourcesMetasIfExpandForDescription(_0x1361bc);_0x325be0['expandMany'](getODataExpandIfExpandForDescription(_0x1361bc))['selectArray'](getODataSelectIfExpandForDescription(_0x1361bc,_0x2c867a));}const _0x52b0cd=await apiGetWithOData(_0x20652f['relation']['relatedResourceName'],_0x325be0['build']());return _0x52b0cd['data'];}__name(fetchRelatedResourcesList,'fetchRelatedResourcesList');

export { fetchRelatedResourcesList };
