text: 'use strict';
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.styles = undefined;
  
  var _extends2 = require('babel-runtime/helpers/extends');
  
  var _extends3 = _interopRequireDefault(_extends2);
  
  var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
  
  var _defineProperty3 = _interopRequireDefault(_defineProperty2);
  
  var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
  
  var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
  
  var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
  
  var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
  
  var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
  
  var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  
  var _createClass2 = require('babel-runtime/helpers/createClass');
  
  var _createClass3 = _interopRequireDefault(_createClass2);
  
  var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
  
  var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
  
  var _inherits2 = require('babel-runtime/helpers/inherits');
  
  var _inherits3 = _interopRequireDefault(_inherits2);
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _propTypes = require('prop-types');
  
  var _propTypes2 = _interopRequireDefault(_propTypes);
  
  var _classnames = require('classnames');
  
  var _classnames2 = _interopRequireDefault(_classnames);
  
  var _withStyles = require('../styles/withStyles');
  
  var _withStyles2 = _interopRequireDefault(_withStyles);
  
  var _helpers = require('../utils/helpers');
  
  var _colorManipulator = require('../styles/colorManipulator');
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  var babelPluginFlowReactPropTypes_proptype_Node = require('react').babelPluginFlowReactPropTypes_proptype_Node || require('prop-types').any;
  
  var babelPluginFlowReactPropTypes_proptype_ElementType = require('react').babelPluginFlowReactPropTypes_proptype_ElementType || require('prop-types').any;
  
  var babelPluginFlowReactPropTypes_proptype_Context = {
    table: require('prop-types').object.isRequired
  };
  
  var babelPluginFlowReactPropTypes_proptype_Padding = require('prop-types').oneOf(['default', 'checkbox', 'dense', 'none']);
  
  var babelPluginFlowReactPropTypes_proptype_Props = {
    /**
     * The table cell contents.
     */
    children: typeof babelPluginFlowReactPropTypes_proptype_Node === 'function' ? babelPluginFlowReactPropTypes_proptype_Node : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_Node),
  
    /**
     * Useful to extend the style applied to components.
     */
    classes: require('prop-types').object,
  
    /**
     * @ignore
     */
    className: require('prop-types').string,
  
    /**
     * The component used for the root node.
     * Either a string to use a DOM element or a component.
     */
    component: typeof babelPluginFlowReactPropTypes_proptype_ElementType === 'function' ? babelPluginFlowReactPropTypes_proptype_ElementType : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_ElementType),
  
    /**
     * If `true`, content will align to the right.
     */
    numeric: require('prop-types').bool.isRequired,
  
    /**
     * Sets the padding applied to the cell.
     */
    padding: require('prop-types').oneOf(['default', 'checkbox', 'dense', 'none']).isRequired
  };
  var styles = exports.styles = function styles(theme) {
    return {
      root: {
        // Workaround for a rendering bug with spanned columns in Chrome 62.0.
        // Removes the alpha (sets it to 1), and lightens or darkens the theme color.
        borderBottom: '1px solid\n    ' + (theme.palette.type === 'light' ? (0, _colorManipulator.lighten)((0, _colorManipulator.fade)(theme.palette.text.lightDivider, 1), 0.925) : (0, _colorManipulator.darken)((0, _colorManipulator.fade)(theme.palette.text.lightDivider, 1), 0.685)),
        textAlign: 'left'
      },
      numeric: {
        textAlign: 'right',
        flexDirection: 'row-reverse' // can be dynamically inherited at runtime by contents
      },
      head: {
        fontWeight: theme.typography.fontWeightMedium,
        position: 'relative' // Workaround for Tooltip positioning issue.
      },
      paddingDefault: {
        padding: theme.spacing.unit / 2 + 'px ' + theme.spacing.unit * 7 + 'px ' + theme.spacing.unit / 2 + 'px ' + theme.spacing.unit * 3 + 'px',
        '&:last-child': {
          paddingRight: theme.spacing.unit * 3
        }
      },
      paddingDense: {
        paddingRight: theme.spacing.unit * 3
      },
      paddingCheckbox: {
        padding: '0 12px'
      },
      footer: {
        borderBottom: 0
      }
    };
  };
  
  var TableCell = function (_React$Component) {
    (0, _inherits3.default)(TableCell, _React$Component);
  
    function TableCell() {
      (0, _classCallCheck3.default)(this, TableCell);
      return (0, _possibleConstructorReturn3.default)(this, (TableCell.__proto__ || (0, _getPrototypeOf2.default)(TableCell)).apply(this, arguments));
    }
  
    (0, _createClass3.default)(TableCell, [{
      key: 'render',
      value: function render() {
        var _classNames;
  
        var _props = this.props,
            classes = _props.classes,
            classNameProp = _props.className,
            children = _props.children,
            numeric = _props.numeric,
            padding = _props.padding,
            component = _props.component,
            other = (0, _objectWithoutProperties3.default)(_props, ['classes', 'className', 'children', 'numeric', 'padding', 'component']);
        var table = this.context.table;
  
        var Component = void 0;
        if (component) {
          Component = component;
        } else {
          Component = table && table.head ? 'th' : 'td';
        }
  
        var className = (0, _classnames2.default)(classes.root, (_classNames = {}, (0, _defineProperty3.default)(_classNames, classes.numeric, numeric), (0, _defineProperty3.default)(_classNames, classes['padding' + (0, _helpers.capitalizeFirstLetter)(padding)], padding !== 'none' && padding !== 'default'), (0, _defineProperty3.default)(_classNames, classes.paddingDefault, padding !== 'none'), (0, _defineProperty3.default)(_classNames, classes.head, table && table.head), (0, _defineProperty3.default)(_classNames, classes.footer, table && table.footer), _classNames), classNameProp);
  
        return _react2.default.createElement(
          Component,
          (0, _extends3.default)({ className: className }, other),
          children
        );
      }
    }]);
    return TableCell;
  }(_react2.default.Component);
  
  TableCell.defaultProps = {
    numeric: false,
    padding: 'default'
  };
  TableCell.contextTypes = {
    table: _propTypes2.default.object.isRequired
  };
  exports.default = (0, _withStyles2.default)(styles, { name: 'MuiTableCell' })(TableCell);