import { isJsObject } from '@jscrpt/common';
/**
 * Extracts dynamic item extensions which are exported as named exports of module
 */
export const extensionsExportsExtractor = (module, logger) => {
    const localModule = module;
    const extensionsObject = localModule.extensions;
    logger === null || logger === void 0 ? void 0 : logger.debug('extensionsExportsExtractor: trying to extract dynamic item extensions');
    //extensions stored as object
    if (extensionsObject && isJsObject(extensionsObject) && (extensionsObject.extensions || extensionsObject.childExtensions)) {
        return {
            extensions: extensionsObject.extensions,
            childExtensions: extensionsObject.childExtensions,
        };
    }
    if (localModule.childExtensions || localModule.extensions) {
        return {
            extensions: localModule.extensions,
            childExtensions: localModule.childExtensions,
        };
    }
    return null;
};
//# sourceMappingURL=extensionsExports.extractor.js.map