"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _colorTokens = _interopRequireDefault(require("./color-tokens"));

var _util = require("../../styles/util");

var _colors = _interopRequireDefault(require("../../tokens/colors"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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; }

var _default = function _default() {
  var foundation = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _colorTokens.default;
  var core = {
    // Background
    backgroundPrimary: foundation.primaryB,
    backgroundSecondary: _colors.default.gray50,
    backgroundTertiary: _colors.default.gray100,
    backgroundInversePrimary: foundation.primaryA,
    backgroundInverseSecondary: _colors.default.gray800,
    // Content
    contentPrimary: foundation.primaryA,
    contentSecondary: _colors.default.gray600,
    contentTertiary: _colors.default.gray500,
    contentInversePrimary: foundation.primaryB,
    contentInverseSecondary: _colors.default.gray300,
    contentInverseTertiary: _colors.default.gray400,
    // Border
    borderOpaque: _colors.default.gray200,
    // @ts-ignore
    borderTransparent: (0, _util.hexToRgb)(foundation.primaryA, '0.08'),
    borderSelected: foundation.primaryA,
    borderInverseOpaque: _colors.default.gray700,
    // @ts-ignore
    borderInverseTransparent: (0, _util.hexToRgb)(foundation.primaryB, '0.2'),
    borderInverseSelected: foundation.primaryB
  };
  var coreExtensions = {
    // Backgrounds
    backgroundStateDisabled: _colors.default.gray50,
    // @ts-ignore
    backgroundOverlay: (0, _util.hexToRgb)(_colors.default.black, '0.5'),
    // @ts-ignore
    backgroundOverlayArt: (0, _util.hexToRgb)(_colors.default.black, '0.00'),
    backgroundAccent: foundation.accent,
    backgroundNegative: foundation.negative,
    backgroundWarning: foundation.warning,
    backgroundPositive: _colors.default.green400,
    backgroundAccentLight: _colors.default.blue50,
    backgroundNegativeLight: _colors.default.red50,
    backgroundWarningLight: _colors.default.yellow50,
    backgroundPositiveLight: _colors.default.green50,
    backgroundAlwaysDark: _colors.default.black,
    backgroundAlwaysLight: _colors.default.white,
    // Content
    contentStateDisabled: _colors.default.gray400,
    contentAccent: foundation.accent,
    contentOnColor: _colors.default.white,
    contentOnColorInverse: _colors.default.black,
    contentNegative: foundation.negative,
    contentWarning: _colors.default.yellow600,
    contentPositive: _colors.default.green400,
    // Border
    borderStateDisabled: _colors.default.gray50,
    borderAccent: _colors.default.blue400,
    borderAccentLight: _colors.default.blue200,
    borderNegative: _colors.default.red200,
    borderWarning: _colors.default.yellow200,
    borderPositive: _colors.default.green200,
    borderNegativeLight: _colors.default.red200,
    borderWarningLight: _colors.default.yellow200,
    borderPositiveLight: _colors.default.green200,
    // Programs
    safety: _colors.default.blue400,
    eatsGreen400: _colors.default.green400,
    freightBlue400: _colors.default.cobalt400,
    jumpRed400: _colors.default.red400,
    rewardsTier1: _colors.default.blue400,
    rewardsTier2: _colors.default.yellow400,
    rewardsTier3: _colors.default.platinum400,
    rewardsTier4: _colors.default.black,
    membership: _colors.default.yellow600
  };
  var deprecated = {
    backgroundOverlayLight: coreExtensions.backgroundOverlay,
    backgroundOverlayDark: coreExtensions.backgroundOverlay,
    backgroundLightAccent: coreExtensions.backgroundAccentLight,
    backgroundLightPositive: coreExtensions.backgroundPositiveLight,
    backgroundLightWarning: coreExtensions.backgroundWarningLight,
    backgroundLightNegative: coreExtensions.backgroundNegativeLight
  };
  return _objectSpread(_objectSpread(_objectSpread({}, core), coreExtensions), deprecated);
};

exports.default = _default;