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) 2018 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 StyledBlock = styled('div', function (_ref) {
  var $theme = _ref.$theme,
      $color = _ref.$color,
      $font = _ref.$font,
      $alignContent = _ref.$alignContent,
      $alignItems = _ref.$alignItems,
      $alignSelf = _ref.$alignSelf,
      $flexDirection = _ref.$flexDirection,
      $display = _ref.$display,
      $flex = _ref.$flex,
      $grid = _ref.$grid,
      $gridArea = _ref.$gridArea,
      $gridAutoColumns = _ref.$gridAutoColumns,
      $gridAutoFlow = _ref.$gridAutoFlow,
      $gridAutoRows = _ref.$gridAutoRows,
      $gridColumn = _ref.$gridColumn,
      $gridColumnEnd = _ref.$gridColumnEnd,
      $gridColumnGap = _ref.$gridColumnGap,
      $gridColumnStart = _ref.$gridColumnStart,
      $gridGap = _ref.$gridGap,
      $gridRow = _ref.$gridRow,
      $gridRowStart = _ref.$gridRowStart,
      $gridRowEnd = _ref.$gridRowEnd,
      $gridTemplate = _ref.$gridTemplate,
      $gridTemplateAreas = _ref.$gridTemplateAreas,
      $gridTemplateColumns = _ref.$gridTemplateColumns,
      $gridTemplateRows = _ref.$gridTemplateRows,
      $justifyContent = _ref.$justifyContent,
      $justifyItems = _ref.$justifyItems,
      $justifySelf = _ref.$justifySelf,
      $position = _ref.$position,
      $width = _ref.$width,
      $minWidth = _ref.$minWidth,
      $maxWidth = _ref.$maxWidth,
      $height = _ref.$height,
      $minHeight = _ref.$minHeight,
      $maxHeight = _ref.$maxHeight,
      $overflow = _ref.$overflow,
      $margin = _ref.$margin,
      $marginTop = _ref.$marginTop,
      $marginRight = _ref.$marginRight,
      $marginBottom = _ref.$marginBottom,
      $marginLeft = _ref.$marginLeft,
      $padding = _ref.$padding,
      $paddingTop = _ref.$paddingTop,
      $paddingRight = _ref.$paddingRight,
      $paddingBottom = _ref.$paddingBottom,
      $paddingLeft = _ref.$paddingLeft,
      $placeContent = _ref.$placeContent,
      $placeItems = _ref.$placeItems,
      $placeSelf = _ref.$placeSelf,
      $flexWrap = _ref.$flexWrap,
      $left = _ref.$left,
      $top = _ref.$top,
      $right = _ref.$right,
      $bottom = _ref.$bottom,
      other = _objectWithoutProperties(_ref, ["$theme", "$color", "$font", "$alignContent", "$alignItems", "$alignSelf", "$flexDirection", "$display", "$flex", "$grid", "$gridArea", "$gridAutoColumns", "$gridAutoFlow", "$gridAutoRows", "$gridColumn", "$gridColumnEnd", "$gridColumnGap", "$gridColumnStart", "$gridGap", "$gridRow", "$gridRowStart", "$gridRowEnd", "$gridTemplate", "$gridTemplateAreas", "$gridTemplateColumns", "$gridTemplateRows", "$justifyContent", "$justifyItems", "$justifySelf", "$position", "$width", "$minWidth", "$maxWidth", "$height", "$minHeight", "$maxHeight", "$overflow", "$margin", "$marginTop", "$marginRight", "$marginBottom", "$marginLeft", "$padding", "$paddingTop", "$paddingRight", "$paddingBottom", "$paddingLeft", "$placeContent", "$placeItems", "$placeSelf", "$flexWrap", "$left", "$top", "$right", "$bottom"]);

  var colors = $theme.colors,
      typography = $theme.typography,
      sizing = $theme.sizing;
  var styles = {};

  if ($color !== undefined) {
    styles.color = colors[$color] || $color;
  }

  if ($font !== undefined) {
    var font = typography[$font];
    styles.fontFamily = font.fontFamily;
    styles.fontWeight = font.fontWeight;
    styles.fontSize = font.fontSize;
    styles.lineHeight = font.lineHeight;
  }

  if ($alignContent !== undefined) {
    styles.alignContent = $alignContent;
  }

  if ($alignItems !== undefined) {
    styles.alignItems = $alignItems;
  }

  if ($alignSelf !== undefined) {
    styles.alignSelf = $alignSelf;
  }

  if ($flexDirection !== undefined) {
    styles.flexDirection = $flexDirection;
  }

  if ($display !== undefined) {
    styles.display = $display;
  }

  if ($flex !== undefined) {
    styles.flex = $flex;
  }

  if ($grid !== undefined) {
    styles.grid = $grid;
  }

  if ($gridArea !== undefined) {
    styles.gridArea = $gridArea;
  }

  if ($gridAutoColumns !== undefined) {
    styles.gridAutoColumns = $gridAutoColumns;
  }

  if ($gridAutoFlow !== undefined) {
    styles.gridAutoFlow = $gridAutoFlow;
  }

  if ($gridAutoRows !== undefined) {
    styles.gridAutoRows = $gridAutoRows;
  }

  if ($gridColumn !== undefined) {
    styles.gridColumn = $gridColumn;
  }

  if ($gridColumnEnd !== undefined) {
    styles.gridColumnEnd = $gridColumnEnd;
  }

  if ($gridColumnGap !== undefined) {
    styles.gridColumnGap = sizing[$gridColumnGap] || $gridColumnGap;
  }

  if ($gridColumnStart !== undefined) {
    styles.gridColumnStart = $gridColumnStart;
  }

  if ($gridGap !== undefined) {
    styles.gridGap = sizing[$gridGap] || $gridGap;
  }

  if ($gridRow !== undefined) {
    styles.gridRow = $gridRow;
  }

  if ($gridRowStart !== undefined) {
    styles.gridRowStart = $gridRowStart;
  }

  if ($gridRowEnd !== undefined) {
    styles.gridRowEnd = $gridRowEnd;
  }

  if ($gridTemplate !== undefined) {
    styles.gridTemplate = $gridTemplate;
  }

  if ($gridTemplateAreas !== undefined) {
    styles.gridTemplateAreas = $gridTemplateAreas;
  }

  if ($gridTemplateColumns !== undefined) {
    styles.gridTemplateColumns = $gridTemplateColumns;
  }

  if ($gridTemplateRows !== undefined) {
    styles.gridTemplateRows = $gridTemplateRows;
  }

  if ($justifyContent !== undefined) {
    styles.justifyContent = $justifyContent;
  }

  if ($justifyItems !== undefined) {
    styles.justifyItems = $justifyItems;
  }

  if ($justifySelf !== undefined) {
    styles.justifySelf = $justifySelf;
  }

  if ($position !== undefined) {
    styles.position = $position;
  }

  if ($width !== undefined) {
    styles.width = $width;
  }

  if ($minWidth !== undefined) {
    styles.minWidth = $minWidth;
  }

  if ($maxWidth !== undefined) {
    styles.maxWidth = $maxWidth;
  }

  if ($height !== undefined) {
    styles.height = $height;
  }

  if ($minHeight !== undefined) {
    styles.minHeight = $minHeight;
  }

  if ($maxHeight !== undefined) {
    styles.maxHeight = $maxHeight;
  }

  if ($overflow === 'scrollX') {
    styles.overflowX = 'scroll';
  } else if ($overflow === 'scrollY') {
    styles.overflowY = 'scroll';
  } else if ($overflow !== undefined) {
    styles.overflow = $overflow;
  }

  if ($margin !== undefined) {
    styles.margin = sizing[$margin] || $margin;
  }

  if ($marginTop !== undefined) {
    styles.marginTop = sizing[$marginTop] || $marginTop;
  }

  if ($marginRight !== undefined) {
    styles.marginRight = sizing[$marginRight] || $marginRight;
  }

  if ($marginBottom !== undefined) {
    styles.marginBottom = sizing[$marginBottom] || $marginBottom;
  }

  if ($marginLeft !== undefined) {
    styles.marginLeft = sizing[$marginLeft] || $marginLeft;
  }

  if ($padding !== undefined) {
    styles.padding = sizing[$padding] || $padding;
  }

  if ($paddingTop !== undefined) {
    styles.paddingTop = sizing[$paddingTop] || $paddingTop;
  }

  if ($paddingRight !== undefined) {
    styles.paddingRight = sizing[$paddingRight] || $paddingRight;
  }

  if ($paddingBottom !== undefined) {
    styles.paddingBottom = sizing[$paddingBottom] || $paddingBottom;
  }

  if ($paddingLeft !== undefined) {
    styles.paddingLeft = sizing[$paddingLeft] || $paddingLeft;
  }

  if ($placeContent !== undefined) {
    styles.placeContent = $placeContent;
  }

  if ($placeItems !== undefined) {
    styles.placeItems = $placeItems;
  }

  if ($placeSelf !== undefined) {
    styles.placeSelf = $placeSelf;
  }

  if ($flexWrap !== undefined) {
    styles.flexWrap = 'wrap';
  }

  if ($left !== undefined) {
    styles.left = $left;
  }

  if ($top !== undefined) {
    styles.top = $top;
  }

  if ($right !== undefined) {
    styles.right = $right;
  }

  if ($bottom !== undefined) {
    styles.bottom = $bottom;
  }

  return styles;
});
StyledBlock.displayName = "StyledBlock";