function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

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 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 React from 'react';
import { styled } from '../styles/index.js';
var StyledTableElement = styled('div', function (_ref) {
  var $theme = _ref.$theme;
  return _objectSpread({}, $theme.borders.border300, {
    borderRadius: $theme.borders.radius200,
    display: 'flex',
    flexDirection: 'column',
    height: '100%',
    overflowX: 'scroll'
  });
});
StyledTableElement.displayName = "StyledTableElement";
export var StyledTable = function StyledTable(props) {
  return React.createElement(StyledTableElement, _extends({
    role: "grid"
  }, props));
};
StyledTable.__STYLETRON__ = StyledTableElement.__STYLETRON__;
var StyledHeadElement = styled('div', function (_ref2) {
  var $theme = _ref2.$theme,
      $width = _ref2.$width;
  return {
    backgroundColor: $theme.colors.tableHeadBackgroundColor,
    boxShadow: $theme.lighting.shadow400,
    display: 'flex',
    flexGrow: 0,
    width: $width ? $width : '100%',
    zIndex: 1
  };
});
StyledHeadElement.displayName = "StyledHeadElement";
export var StyledHead = function StyledHead(props) {
  return React.createElement(StyledHeadElement, _extends({
    role: "row"
  }, props));
};
var StyledHeadCellElement = styled('div', function (_ref3) {
  var $theme = _ref3.$theme;
  return _objectSpread({}, $theme.typography.font350, $theme.borders.border300, {
    borderTop: 'none',
    borderBottom: 'none',
    borderLeft: 'none',
    display: 'flex',
    justifyContent: 'space-between',
    paddingTop: $theme.sizing.scale500,
    paddingRight: $theme.sizing.scale600,
    paddingBottom: $theme.sizing.scale500,
    paddingLeft: $theme.sizing.scale600,
    width: '100%',
    ':last-of-type': {
      borderRight: 'none'
    }
  });
});
StyledHeadCellElement.displayName = "StyledHeadCellElement";
export var StyledHeadCell = function StyledHeadCell(props) {
  return React.createElement(StyledHeadCellElement, _extends({
    role: "columnheader"
  }, props));
};
StyledHeadCell.__STYLETRON__ = StyledHeadCellElement.__STYLETRON__;
export var StyledSortableLabel = styled('button', function (_ref4) {
  var $theme = _ref4.$theme;
  return _objectSpread({}, $theme.typography.font350, {
    alignItems: 'center',
    border: 'none',
    display: 'flex',
    padding: 0,
    ':hover:enabled': {
      cursor: 'pointer'
    },
    ':disabled': {
      color: $theme.colors.mono500
    }
  });
});
StyledSortableLabel.displayName = "StyledSortableLabel";
var StyledBodyElement = styled('div', function (_ref5) {
  var $width = _ref5.$width;
  return {
    width: $width ? $width : '100%',
    overflowX: 'hidden',
    overflowY: 'overlay',
    flex: 1
  };
});
StyledBodyElement.displayName = "StyledBodyElement";
export var StyledBody = function StyledBody(props) {
  return React.createElement(StyledBodyElement, _extends({
    role: "rowgroup"
  }, props));
};
StyledBody.__STYLETRON__ = StyledBodyElement.__STYLETRON__;
var StyledRowElement = styled('div', function (_ref6) {
  var $theme = _ref6.$theme;
  return {
    display: 'flex',
    alignItems: 'center'
  };
});
StyledRowElement.displayName = "StyledRowElement";
export var StyledRow = function StyledRow(props) {
  return React.createElement(StyledRowElement, _extends({
    role: "row"
  }, props));
};
StyledRow.__STYLETRON__ = StyledRowElement.__STYLETRON__;
var StyledCellElement = styled('div', function (_ref7) {
  var $theme = _ref7.$theme;
  return _objectSpread({}, $theme.typography.font300, {
    display: 'flex',
    flex: 1,
    paddingTop: $theme.sizing.scale300,
    paddingRight: $theme.sizing.scale600,
    paddingBottom: $theme.sizing.scale300,
    paddingLeft: $theme.sizing.scale600
  });
});
StyledCellElement.displayName = "StyledCellElement";
export var StyledCell = function StyledCell(props) {
  return React.createElement(StyledCellElement, _extends({
    role: "gridcell"
  }, props));
};
StyledCell.__STYLETRON__ = StyledCellElement.__STYLETRON__;
export var StyledFilterButton = styled('button', {
  border: 'none',
  padding: 'none'
});
StyledFilterButton.displayName = "StyledFilterButton";
export var StyledFilterContent = styled('div', function (_ref8) {
  var $theme = _ref8.$theme;
  return _objectSpread({}, $theme.borders.border300, {
    borderRight: 'none',
    borderLeft: 'none',
    maxHeight: '196px',
    paddingRight: $theme.sizing.scale600,
    paddingLeft: $theme.sizing.scale600,
    overflow: 'auto'
  });
});
StyledFilterContent.displayName = "StyledFilterContent";
export var StyledFilterHeading = styled('div', function (_ref9) {
  var $theme = _ref9.$theme;
  return _objectSpread({}, $theme.typography.font350, {
    color: $theme.colors.mono700,
    paddingTop: $theme.sizing.scale500,
    paddingRight: $theme.sizing.scale600,
    paddingBottom: $theme.sizing.scale500,
    paddingLeft: $theme.sizing.scale600
  });
});
StyledFilterHeading.displayName = "StyledFilterHeading";
export var StyledFilterFooter = styled('div', function (_ref10) {
  var $theme = _ref10.$theme;
  return {
    backgroundColor: $theme.colors.mono200,
    paddingTop: $theme.sizing.scale300,
    paddingRight: $theme.sizing.scale100,
    paddingBottom: $theme.sizing.scale300,
    paddingLeft: $theme.sizing.scale100,
    display: 'flex',
    justifyContent: 'space-between',
    width: '216px'
  };
});
StyledFilterFooter.displayName = "StyledFilterFooter";
export var StyledAction = styled('button', function (_ref11) {
  var $theme = _ref11.$theme;
  return {
    border: 'none',
    color: $theme.colors.primary,
    paddingTop: 0,
    paddingRight: 0,
    paddingBottom: 0,
    paddingLeft: 0,
    marginRight: $theme.sizing.scale100,
    marginLeft: $theme.sizing.scale100,
    ':hover:enabled': {
      cursor: 'pointer'
    }
  };
});
StyledAction.displayName = "StyledAction";