'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _themeGet = require('../../../extensions/themeGet');

var _themeGet2 = _interopRequireDefault(_themeGet);

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

var TableBody = _styledComponents2.default.tbody.withConfig({
  displayName: 'TableBody'
})(['& > tr{&:nth-child(odd){background:', ';}&:nth-child(even){background:', ';}}'], function (props) {
  return props.zebraStripe && props.startIndex % 2 === 1 ? (0, _themeGet2.default)('colors.shadow.extraLight')(props) : 'transparent';
}, function (props) {
  return props.zebraStripe ? props.startIndex % 2 === 1 ? 'transparent' : (0, _themeGet2.default)('colors.shadow.extraLight')(props) : 'transparent';
});

TableBody.defaultProps = {
  zebraStripe: true,
  startIndex: 0
};

exports.default = TableBody;