import { defaultExportExtractor, extensionsExportsExtractor } from '@anglr/dynamic';
/**
 * Extracts layout designer type which is on decorated type exported by module exports as default export
 */
export const layoutDesignerTypeExtractor = async (module, logger) => {
    const def = (await defaultExportExtractor(module, logger));
    const ext = (await extensionsExportsExtractor(module, logger));
    const localModule = def?.data;
    const localModuleEditorData = module;
    logger?.debug('layoutDesignerTypeExtractor: trying to extract default dynamic data');
    if (!localModule?.layoutEditorDesignerType) {
        return null;
    }
    const type = await localModule?.layoutEditorDesignerType;
    if (type) {
        return {
            data: type,
            displayName: localModuleEditorData?.displayName,
            description: localModuleEditorData?.description,
            group: localModuleEditorData?.group,
            childExtensions: ext?.childExtensions,
            extensions: ext?.extensions
        };
    }
    return null;
};
//# sourceMappingURL=layoutDesignerType.extractor.js.map