const _themes = require('./themes.json')
const schemeColors = {}
const _default = _themes.blue

const additionalColors = [
    'primary-actions',
    'primary-alternative-actions',
    'secondary-actions',
    'destructive-actions',
    'error-actions',
    'success-actions',
    'warning-actions',
    'active-elements',
    'inactive-elements'
]
const postfixes = [
    '--focus',
    '--pressed',
    '-bg--focus',
    '-bg--pressed'
]

Object.keys(_default).forEach(variableName => {
    schemeColors[variableName] = `var(--${variableName})`
})

additionalColors.forEach(colorName => {
    if (!colorName.endsWith('elements')) {
        schemeColors[colorName] = `var(--${colorName})`
    }
    postfixes.forEach(ends => {
        const _key = colorName + ends
        schemeColors[_key] = `var(--${_key})`
    })
})

module.exports = schemeColors
