'use strict';
import { integrationConstants } from '../../../../meta/server/integration-platforms/fd-integration-cache.js';
import { apiBadRequestError } from '../../../../../fd-toolbox/server/web/errors.js';
import { getResourceNameFromResourceMetaId } from '../../../../meta/server/services/resource-name-converter.js';
import { getDynamicFieldsFromUiMeta } from '../../../integration-platforms/subscription-odata.js';
import { apiNoContentResponse, apiOkResponse } from '../../../../meta/server/web/responses.js';
import { getUiResourceMeta } from '../../../../meta/server/ui/ui-metas.js';

var __defProp=Object['defineProperty'],__name=(_0x47710a,_0x222a8c)=>__defProp(_0x47710a,'name',{'value':_0x222a8c,'configurable':!![]});async function integrationDynamicFieldsGetRoute(_0x2fdb34){const _0x5cacfb=new URL(_0x2fdb34['url'])['searchParams']['get'](integrationConstants['resourceMetaId']);if(!_0x5cacfb)throw apiBadRequestError();const _0xbe0df=await getResourceNameFromResourceMetaId(_0x5cacfb),_0x28892d=await getUiResourceMeta(_0xbe0df),_0xfdea13=getDynamicFieldsFromUiMeta(_0x28892d);if(!_0xfdea13)return apiNoContentResponse();return apiOkResponse(_0xfdea13);}__name(integrationDynamicFieldsGetRoute,'integrationDynamicFieldsGetRoute');

export { integrationDynamicFieldsGetRoute };
