text: 'use strict';
  
  Object.defineProperty(exports, '__esModule', { value: true });
  
  var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-d23df5c1.js');
  var colors = require('./colors-da502c66.js');
  var jsutils = require('@keg-hub/jsutils');
  var themeDefaults = require('./themeDefaults-f48ffcaf.js');
  require('@keg-hub/re-theme/colors');
  
  var colorStyles = function colorStyles(colorSurface, type, states, cb) {
    return Object.keys(states).reduce(function (built, key) {
      return _rollupPluginBabelHelpers._objectSpread2(_rollupPluginBabelHelpers._objectSpread2({}, built), {}, _rollupPluginBabelHelpers._defineProperty({}, key, jsutils.checkCall(cb, type, colorSurface[type], key)));
    }, {});
  };
  var buildColorStyles = function buildColorStyles(states, cb) {
    var defaults = themeDefaults.getThemeDefaults();
    var colorSurface = colors.getColorSurface();
    return Object.keys(jsutils.get(defaults, 'colors.types', {})).reduce(function (built, type) {
      var styles = colorStyles(colorSurface, type, states, cb);
      styles && (built[type] = styles);
      return built;
    }, {});
  };
  var buildSurfaceStyles = function buildSurfaceStyles(cb) {
    var colorSurface = colors.getColorSurface();
    return Object.keys(colorSurface).reduce(function (surfaceStyles, surface) {
      surfaceStyles[surface] = jsutils.checkCall(cb, surface, colorSurface);
      return surfaceStyles;
    }, {});
  };
  
  exports.buildColorStyles = buildColorStyles;
  exports.buildSurfaceStyles = buildSurfaceStyles;
  //# sourceMappingURL=buildColorStyles.js.map
  