var _excluded = ["primaryFontFamily"];

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

/*
Copyright (c) Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import animation from '../shared/animation';
import borders from '../shared/borders';
import breakpoints from '../shared/breakpoints';
import deepMerge from '../../utils/deep-merge';
import defaultFoundationColorTokens from './color-tokens';
import { colors as primitiveColorTokens } from '../../tokens';
import getComponentColorTokens from './color-component-tokens';
import getSemanticColorTokens from './color-semantic-tokens';
import typography from '../shared/typography';
import grid from '../shared/grid';
import lighting from '../shared/lighting';
import mediaQuery from '../shared/media-query';
import sizing from '../shared/sizing';
export default function createLightTheme() {
  var primitives = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  var // Used to override default theme property values derived from primitives
  overrides = arguments.length > 1 ? arguments[1] : undefined;

  // Extract font tokens and color tokens from primitives
  var primaryFontFamily = primitives.primaryFontFamily,
      customColorTokens = _objectWithoutProperties(primitives, _excluded); // Assemble color tokens by overriding defaults with custom color tokens


  var foundationColorTokens = _objectSpread(_objectSpread({}, defaultFoundationColorTokens), customColorTokens);

  var theme = {
    animation: animation,
    borders: borders,
    breakpoints: breakpoints,
    colors: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, primitiveColorTokens), foundationColorTokens), getComponentColorTokens(foundationColorTokens)), getSemanticColorTokens(foundationColorTokens)),
    direction: 'auto',
    grid: grid,
    lighting: lighting,
    mediaQuery: mediaQuery,
    sizing: sizing,
    typography: typography,
    // TODO(#2318) Remove in v11, the next major version.
    // Do not use.
    zIndex: {
      modal: 2000
    }
  };
  return deepMerge(theme, overrides);
}