export const getNestedShareableComponentKeys = components => {
    if (components) {
        return Object.keys(components).filter((c => !c.includes('orderable')));
    }
    return [];
};

export const getNestedShareableComponents = (shareableComponentKeys, components) => {
    if (components && shareableComponentKeys) {
        return shareableComponentKeys.map(c => ({ ...components[c] }));
    }
    return [];
};
