import { relationsExportExtractor } from '@anglr/dynamic/relations';
/**
 * Extracts dynamic relations node from default locations
 */
export const relationsNodeExtractor = async (module, logger) => {
    const relations = await relationsExportExtractor(module, logger);
    logger?.debug('relationsNodeExtractor: trying to extract dynamic node');
    if (!relations) {
        return null;
    }
    const nodeMeta = relations.data;
    if (!nodeMeta) {
        return null;
    }
    const metadata = await nodeMeta.relationsEditorMetadata;
    if (!metadata) {
        return null;
    }
    return {
        data: metadata.nodeDefinition,
        metaInfo: metadata.metaInfo,
    };
};
//# sourceMappingURL=relationsNode.extractor.js.map