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 _ref;
  
  var _react = require('react');
  
  var _react2 = _interopRequireDefault(_react);
  
  var _classnames = require('classnames');
  
  var _classnames2 = _interopRequireDefault(_classnames);
  
  var _Typography = require('../Typography');
  
  var _Typography2 = _interopRequireDefault(_Typography);
  
  var _withStyles = require('../styles/withStyles');
  
  var _withStyles2 = _interopRequireDefault(_withStyles);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  var babelPluginFlowReactPropTypes_proptype_ElementType = require('react').babelPluginFlowReactPropTypes_proptype_ElementType || require('prop-types').any;
  
  var babelPluginFlowReactPropTypes_proptype_Node = require('react').babelPluginFlowReactPropTypes_proptype_Node || require('prop-types').any;
  
  var styles = exports.styles = function styles(theme) {
    return {
      root: {
        'label + div > &': {
          marginTop: -theme.spacing.unit * 2
        }
      },
      positionStart: {
        marginRight: theme.spacing.unit
      },
      positionEnd: {
        marginLeft: theme.spacing.unit
      }
    };
  };
  
  var babelPluginFlowReactPropTypes_proptype_Props = {
    /**
     * The content of the component, normally an `IconButton` or string.
     */
    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 children is a string then disable wrapping in a Typography component.
     */
    disableTypography: require('prop-types').bool,
  
    /**
     * The position this adornment should appear relative to the `Input`.
     */
    position: require('prop-types').oneOf(['start', 'end']).isRequired
  };
  
  
  function InputAdornment(props) {
    var _classNames;
  
    var children = props.children,
        Component = props.component,
        classes = props.classes,
        className = props.className,
        disableTypography = props.disableTypography,
        position = props.position,
        other = (0, _objectWithoutProperties3.default)(props, ['children', 'component', 'classes', 'className', 'disableTypography', 'position']);
  
  
    return _react2.default.createElement(
      Component,
      (0, _extends3.default)({
        className: (0, _classnames2.default)(classes.root, (_classNames = {}, (0, _defineProperty3.default)(_classNames, classes.positionStart, position === 'start'), (0, _defineProperty3.default)(_classNames, classes.positionEnd, position === 'end'), _classNames), className)
      }, other),
      typeof children === 'string' && !disableTypography ? _react2.default.createElement(
        _Typography2.default,
        { color: 'secondary' },
        children
      ) : children
    );
  }
  
  InputAdornment.propTypes = process.env.NODE_ENV !== "production" ? (_ref = {
    classes: require('prop-types').object.isRequired,
    component: typeof babelPluginFlowReactPropTypes_proptype_ElementType === 'function' ? babelPluginFlowReactPropTypes_proptype_ElementType.isRequired ? babelPluginFlowReactPropTypes_proptype_ElementType.isRequired : babelPluginFlowReactPropTypes_proptype_ElementType : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_ElementType).isRequired,
    disableTypography: require('prop-types').bool.isRequired,
    children: typeof babelPluginFlowReactPropTypes_proptype_Node === 'function' ? babelPluginFlowReactPropTypes_proptype_Node : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_Node)
  }, (0, _defineProperty3.default)(_ref, 'classes', require('prop-types').object), (0, _defineProperty3.default)(_ref, 'className', require('prop-types').string), (0, _defineProperty3.default)(_ref, 'component', typeof babelPluginFlowReactPropTypes_proptype_ElementType === 'function' ? babelPluginFlowReactPropTypes_proptype_ElementType : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_ElementType)), (0, _defineProperty3.default)(_ref, 'disableTypography', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'position', require('prop-types').oneOf(['start', 'end']).isRequired), _ref) : {};
  InputAdornment.defaultProps = {
    component: 'div',
    disableTypography: false
  };
  
  exports.default = (0, _withStyles2.default)(styles, { name: 'MuiInputAdornment' })(InputAdornment);