function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, 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; }

/*
Copyright (c) 2018-2019 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 { styled } from '../styles/index.js';
export var StyledProgressSteps = styled('div', function (_ref) {
  var $theme = _ref.$theme;
  return {
    backgroundColor: $theme.colors.listHeaderFill,
    display: 'inline-block',
    paddingTop: $theme.sizing.scale300,
    paddingRight: $theme.sizing.scale500,
    paddingLeft: $theme.sizing.scale500,
    paddingBottom: $theme.sizing.scale300
  };
});
StyledProgressSteps.displayName = "StyledProgressSteps";
export var StyledStep = styled('div', function (_ref2) {
  var $theme = _ref2.$theme;
  return {
    position: 'relative',
    overflow: 'visible'
  };
});
StyledStep.displayName = "StyledStep";
export var StyledIcon = styled('div', function (_ref3) {
  var $theme = _ref3.$theme,
      $isActive = _ref3.$isActive,
      $isCompleted = _ref3.$isCompleted,
      $disabled = _ref3.$disabled;
  var currentColor = $theme.colors.mono400;
  var size = $theme.sizing.scale300;
  var marginRight = $theme.sizing.scale500;
  var marginLeft = $theme.sizing.scale100;
  var font = $theme.typography.font400;

  if ($isCompleted) {
    currentColor = $theme.colors.primary400;
  } else if ($isActive) {
    font = $theme.typography.font450;
    currentColor = $theme.colors.progressStepsIconActiveFill;
  }

  if ($isActive) {
    size = $theme.sizing.scale600;
    marginLeft = 0;
    marginRight = $theme.sizing.scale300;
  }

  var marginTop = "calc((".concat(font.lineHeight, " - ").concat(size, ") / 2)");
  return {
    marginRight: marginRight,
    marginLeft: marginLeft,
    marginTop: marginTop,
    width: size,
    height: size,
    lineHeight: size,
    borderTopLeftRadius: size,
    borderTopRightRadius: size,
    borderBottomRightRadius: size,
    borderBottomLeftRadius: size,
    backgroundColor: currentColor,
    float: 'left',
    textAlign: 'center',
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center'
  };
});
StyledIcon.displayName = "StyledIcon";
export var StyledInnerIcon = styled('div', function (_ref4) {
  var $theme = _ref4.$theme;
  return {
    width: $theme.sizing.scale100,
    height: $theme.sizing.scale100,
    lineHeight: $theme.sizing.scale100,
    borderTopLeftRadius: $theme.sizing.scale100,
    borderTopRightRadius: $theme.sizing.scale100,
    borderBottomRightRadius: $theme.sizing.scale100,
    borderBottomLeftRadius: $theme.sizing.scale100,
    backgroundColor: $theme.colors.primary400,
    textAlign: 'center'
  };
});
StyledInnerIcon.displayName = "StyledInnerIcon";
export var StyledContent = styled('div', function (_ref5) {
  var $theme = _ref5.$theme;
  return {
    marginLeft: $theme.sizing.scale900
  };
});
StyledContent.displayName = "StyledContent";
export var StyledContentTitle = styled('div', function (_ref6) {
  var $theme = _ref6.$theme,
      $isActive = _ref6.$isActive;
  var color = $theme.colors.foregroundAlt;
  var font = $theme.typography.font400;

  if ($isActive) {
    color = $theme.colors.foreground;
    font = $theme.typography.font450;
  }

  return _objectSpread({}, font, {
    color: color
  });
});
StyledContentTitle.displayName = "StyledContentTitle";
export var StyledContentTail = styled('div', function (_ref7) {
  var $theme = _ref7.$theme,
      $isCompleted = _ref7.$isCompleted,
      $isActive = _ref7.$isActive;
  var currentColor = $theme.colors.mono400;

  if ($isCompleted) {
    currentColor = $theme.colors.primary400;
  }

  return {
    position: 'absolute',
    left: '7px',
    top: 0,
    height: '100%',
    paddingBottom: 0,
    width: $theme.sizing.scale0,
    paddingTop: $isActive ? $theme.sizing.scale700 : $theme.sizing.scale600,
    ':after': {
      content: '""',
      display: 'inline-block',
      height: "calc(100% + ".concat($theme.sizing.scale500, ")"),
      width: '100%',
      backgroundColor: currentColor
    }
  };
});
StyledContentTail.displayName = "StyledContentTail";
export var StyledContentDescription = styled('div', function (_ref8) {
  var $theme = _ref8.$theme;
  return {
    marginBottom: $theme.sizing.scale700
  };
});
StyledContentDescription.displayName = "StyledContentDescription";
export var StyledNumberStep = styled('div', function (_ref9) {
  var $theme = _ref9.$theme;
  return {
    position: 'relative',
    overflow: 'visible'
  };
});
StyledNumberStep.displayName = "StyledNumberStep";
export var StyledNumberIcon = styled('div', function (_ref10) {
  var $theme = _ref10.$theme,
      $isActive = _ref10.$isActive,
      $isCompleted = _ref10.$isCompleted,
      $disabled = _ref10.$disabled;
  var backgroundColor = $theme.colors.mono400;
  var color = $theme.colors.colorSecondary;
  var size = $theme.sizing.scale800;
  var marginRight = $theme.sizing.scale300;
  var font = $theme.typography.font350;
  var titleFont = $theme.typography.font400;

  if ($isCompleted) {
    backgroundColor = $theme.colors.primary400;
    color = $theme.colors.white;
  } else if ($isActive) {
    titleFont = $theme.typography.font450;
    color = $theme.colors.primary400;
    backgroundColor = $theme.colors.progressStepsIconActiveFill;
  }

  var marginTop = "calc((".concat(titleFont.lineHeight, " - ").concat(size, ") / 2)");
  return _objectSpread({
    marginRight: marginRight,
    marginTop: marginTop,
    width: size,
    height: size,
    borderTopLeftRadius: size,
    borderTopRightRadius: size,
    borderBottomRightRadius: size,
    borderBottomLeftRadius: size,
    backgroundColor: backgroundColor,
    color: color,
    float: 'left',
    textAlign: 'center',
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center'
  }, font);
});
StyledNumberIcon.displayName = "StyledNumberIcon";
export var StyledNumberContentTail = styled('div', function (_ref11) {
  var $theme = _ref11.$theme,
      $isActive = _ref11.$isActive,
      $isCompleted = _ref11.$isCompleted,
      $disabled = _ref11.$disabled;
  var currentColor = $theme.colors.mono300;

  if ($isCompleted) {
    currentColor = $theme.colors.primary400;
  }

  return {
    position: 'absolute',
    left: '11px',
    top: 0,
    height: '100%',
    paddingBottom: 0,
    width: $theme.sizing.scale0,
    paddingTop: $theme.sizing.scale800,
    ':after': {
      content: '""',
      display: 'inline-block',
      height: '100%',
      width: '100%',
      backgroundColor: currentColor
    }
  };
});
StyledNumberContentTail.displayName = "StyledNumberContentTail";