"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.configureBaseResources = configureBaseResources;
/**
 * Takes the resources prop from an entity model and returns an array of
 * objects with a filename and resource to be created.
 *
 * @param {*} resources
 * @return {*}
 */
function configureBaseResources(resources, entityResourceMap) {
    return Object.entries(resources).reduce((acc, resourceProp) => {
        const fileName = entityResourceMap[resourceProp[0]];
        if (fileName) {
            acc.push({
                filename: fileName,
                resource: resourceProp[1],
            });
        }
        return acc;
    }, []);
}
//# sourceMappingURL=configureBaseResources.js.map