export type GapSizes = "small" | "medium" | "large" | '';
const merge = require('deepmerge')

export const getGapValue = (gap: GapSizes): number => {
    switch (gap) {
        case 'small':
            return 2
        case 'medium':
            return 4
        case 'large':
            return 5
        default:
            break;
    }
    return 0
}


export const getModeTheme = (input: any, mode: string): any => {
    let result = {}
    Object.keys(input).forEach(key => {
        var value = input[key];
        Object.keys(value).map(innerKey => {
            if (innerKey === 'modes') {
                var out = value[innerKey] && value[innerKey][mode];
                if(out) {
                    result[key] = out
                }
            }
        })
    })
    return merge(input, result);
}
