export function getNameMemberPairs(members) {
    const items = [];
    members.forEach((cube) => cube.members.forEach((member) => {
        items.push([member.name, member]);
    }));
    return items;
}
export function getMembersByCube(availableMembers) {
    const membersByCube = {};
    Object.entries(availableMembers).forEach(([memberType, cubes]) => {
        cubes.forEach((cube) => {
            if (!membersByCube[cube.cubeName]) {
                membersByCube[cube.cubeName] = {
                    cubeName: cube.cubeName,
                    cubeTitle: cube.cubeTitle,
                    measures: [],
                    dimensions: [],
                    segments: [],
                    timeDimensions: [],
                };
            }
            cube.members.forEach((member) => {
                membersByCube[cube.cubeName] = {
                    ...membersByCube[cube.cubeName],
                    [memberType]: [...membersByCube[cube.cubeName][memberType], member],
                };
            });
        });
    });
    return Object.values(membersByCube);
}
//# sourceMappingURL=members.js.map