"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.StyledAction = exports.StyledFilterFooter = exports.StyledFilterHeading = exports.StyledFilterContent = exports.StyledFilterButton = exports.StyledCell = exports.StyledRow = exports.StyledBody = exports.StyledSortableLabel = exports.StyledHeadCell = exports.StyledHead = exports.StyledTable = void 0;

var React = _interopRequireWildcard(require("react"));

var _index = require("../styles/index.js");

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

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

var StyledTableElement = (0, _index.styled)('div', function (_ref) {
  var $theme = _ref.$theme;
  return _objectSpread({}, $theme.borders.border300, {
    backgroundColor: $theme.colors.tableBackground,
    borderTopLeftRadius: $theme.borders.radius200,
    borderTopRightRadius: $theme.borders.radius200,
    borderBottomRightRadius: $theme.borders.radius200,
    borderBottomLeftRadius: $theme.borders.radius200,
    display: 'flex',
    flexDirection: 'column',
    height: '100%',
    overflowX: 'scroll'
  });
});
StyledTableElement.displayName = "StyledTableElement";

var StyledTable = function StyledTable(props) {
  return React.createElement(StyledTableElement, _extends({
    "data-baseweb": "table-custom",
    role: "grid"
  }, props));
};

exports.StyledTable = StyledTable;
StyledTable.__STYLETRON__ = StyledTableElement.__STYLETRON__;
var StyledHeadElement = (0, _index.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%'
  };
});
StyledHeadElement.displayName = "StyledHeadElement";

var StyledHead = function StyledHead(props) {
  return React.createElement(StyledHeadElement, _extends({
    role: "row"
  }, props));
};

exports.StyledHead = StyledHead;
StyledHead.__STYLETRON__ = StyledHeadElement.__STYLETRON__;
var StyledHeadCellElement = (0, _index.styled)('div', function (_ref3) {
  var $theme = _ref3.$theme;
  return _objectSpread({}, $theme.typography.font350, $theme.borders.border300, {
    borderTop: 'none',
    borderBottom: 'none',
    borderLeft: 'none',
    color: $theme.colors.colorPrimary,
    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";

var StyledHeadCell = function StyledHeadCell(props) {
  return React.createElement(StyledHeadCellElement, _extends({
    role: "columnheader"
  }, props));
};

exports.StyledHeadCell = StyledHeadCell;
StyledHeadCell.__STYLETRON__ = StyledHeadCellElement.__STYLETRON__;
var StyledSortableLabel = (0, _index.styled)('button', function (_ref4) {
  var $theme = _ref4.$theme;
  return _objectSpread({}, $theme.typography.font350, {
    alignItems: 'center',
    backgroundColor: 'transparent',
    border: 'none',
    color: $theme.colors.colorPrimary,
    display: 'flex',
    padding: 0,
    ':hover:enabled': {
      cursor: 'pointer'
    },
    ':disabled': {
      color: $theme.colors.mono500
    }
  });
});
exports.StyledSortableLabel = StyledSortableLabel;
StyledSortableLabel.displayName = "StyledSortableLabel";
var StyledBodyElement = (0, _index.styled)('div', function (_ref5) {
  var $width = _ref5.$width;
  return {
    width: $width ? $width : '100%',
    overflowX: 'hidden',
    overflowY: 'overlay',
    flex: 1
  };
});
StyledBodyElement.displayName = "StyledBodyElement";

var StyledBody = function StyledBody(props) {
  return React.createElement(StyledBodyElement, _extends({
    role: "rowgroup"
  }, props));
};

exports.StyledBody = StyledBody;
StyledBody.__STYLETRON__ = StyledBodyElement.__STYLETRON__;
var StyledRowElement = (0, _index.styled)('div', {
  display: 'flex',
  alignItems: 'center'
});
StyledRowElement.displayName = "StyledRowElement";

var StyledRow = function StyledRow(props) {
  return React.createElement(StyledRowElement, _extends({
    role: "row"
  }, props));
};

exports.StyledRow = StyledRow;
StyledRow.__STYLETRON__ = StyledRowElement.__STYLETRON__;
var StyledCellElement = (0, _index.styled)('div', function (_ref6) {
  var $theme = _ref6.$theme;
  return _objectSpread({}, $theme.typography.font300, {
    color: $theme.colors.colorPrimary,
    display: 'flex',
    flex: 1,
    paddingTop: $theme.sizing.scale300,
    paddingRight: $theme.sizing.scale600,
    paddingBottom: $theme.sizing.scale300,
    paddingLeft: $theme.sizing.scale600
  });
});
StyledCellElement.displayName = "StyledCellElement";

var StyledCell = function StyledCell(props) {
  return React.createElement(StyledCellElement, _extends({
    role: "gridcell"
  }, props));
};

exports.StyledCell = StyledCell;
StyledCell.__STYLETRON__ = StyledCellElement.__STYLETRON__;
var StyledFilterButton = (0, _index.styled)('button', {
  backgroundColor: 'transparent',
  border: 'none',
  paddingTop: 'none',
  paddingRight: 'none',
  paddingBottom: 'none',
  paddingLeft: 'none'
});
exports.StyledFilterButton = StyledFilterButton;
StyledFilterButton.displayName = "StyledFilterButton";
var StyledFilterContent = (0, _index.styled)('div', function (_ref7) {
  var $theme = _ref7.$theme;
  return _objectSpread({}, $theme.borders.border300, {
    backgroundColor: $theme.colors.tableFilterBackground,
    borderRight: 'none',
    borderLeft: 'none',
    maxHeight: '196px',
    paddingRight: $theme.sizing.scale600,
    paddingLeft: $theme.sizing.scale600,
    overflow: 'auto'
  });
});
exports.StyledFilterContent = StyledFilterContent;
StyledFilterContent.displayName = "StyledFilterContent";
var StyledFilterHeading = (0, _index.styled)('div', function (_ref8) {
  var $theme = _ref8.$theme;
  return _objectSpread({}, $theme.typography.font350, {
    color: $theme.colors.tableFilterHeading,
    paddingTop: $theme.sizing.scale500,
    paddingRight: $theme.sizing.scale600,
    paddingBottom: $theme.sizing.scale500,
    paddingLeft: $theme.sizing.scale600
  });
});
exports.StyledFilterHeading = StyledFilterHeading;
StyledFilterHeading.displayName = "StyledFilterHeading";
var StyledFilterFooter = (0, _index.styled)('div', function (_ref9) {
  var $theme = _ref9.$theme;
  return {
    backgroundColor: $theme.colors.tableFilterFooterBackground,
    paddingTop: $theme.sizing.scale300,
    paddingRight: $theme.sizing.scale100,
    paddingBottom: $theme.sizing.scale300,
    paddingLeft: $theme.sizing.scale100,
    display: 'flex',
    justifyContent: 'space-between',
    minWidth: '216px'
  };
});
exports.StyledFilterFooter = StyledFilterFooter;
StyledFilterFooter.displayName = "StyledFilterFooter";
var StyledAction = (0, _index.styled)('button', function (_ref10) {
  var $theme = _ref10.$theme;
  return {
    backgroundColor: 'transparent',
    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'
    }
  };
});
exports.StyledAction = StyledAction;
StyledAction.displayName = "StyledAction";