"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasDimmedColor = hasDimmedColor;
exports.getDimmedColor = getDimmedColor;
function isColorDimmedConfig(config) {
    return !('opacity' in config);
}
function hasDimmedColor(isDimmed, dimmedConfig, colorKey) {
    return isDimmed && isColorDimmedConfig(dimmedConfig) && dimmedConfig[colorKey] !== undefined;
}
function getDimmedColor(isDimmed, dimmedConfig, colorKey, defaultColor) {
    if (isDimmed && isColorDimmedConfig(dimmedConfig)) {
        const dimmedColor = dimmedConfig[colorKey];
        if (dimmedColor !== undefined) {
            return dimmedColor;
        }
    }
    return defaultColor;
}
//# sourceMappingURL=dimmed_colors.js.map