const React = require('react');

const Column = React.createClass({
  propTypes: {
    breakpointLarge: React.PropTypes.number,
    breakpointMedium: React.PropTypes.number,
    breakpointSmall: React.PropTypes.number,
    columnCount: React.PropTypes.number,
    columnLarge: React.PropTypes.number,
    columnMedium: React.PropTypes.number,
    columnSmall: React.PropTypes.number,
    offsetLarge: React.PropTypes.number,
    offsetMedium: React.PropTypes.number,
    offsetSmall: React.PropTypes.number,
    orderLarge: React.PropTypes.number,
    orderMediumpoint: React.PropTypes.number,
    orderSmall: React.PropTypes.number,
    style: React.PropTypes.object
  },

  getDefaultProps () {
    return {
      breakpointLarge: 1200,
      breakpointMedium: 750,
      columnCount: 12,
      columnLarge: 12,
      columnMedium: 12,
      columnSmall: 12,
      offsetLarge: 0,
      offsetMedium: 0,
      offsetSmall: 0
    };
  },

  getInitialState () {
    return {
      screenWidth: this._getScreenWidth()
    };
  },

  componentDidMount () {
    window.addEventListener('resize', this._handleWindowResize);
  },

  componentWillUnmount () {
    window.removeEventListener('resize', this._handleWindowResize);
  },

  _getScreenWidth () {
    const width = document.documentElement.clientWidth || document.body.clientWidth;
    let screenWidth = 'Small';

    if (width >= this.props.breakpointLarge) {
      screenWidth = 'Large';
    } else if (width >= this.props.breakpointMedium) {
      screenWidth = 'Medium';
    }

    return screenWidth;
  },

  _handleWindowResize () {
    this.setState({
      screenWidth: this._getScreenWidth()
    });
  },

  render () {
    const styles = this.styles();

    return (
      <div style={styles.component}>
        {this.props['column' + this.state.screenWidth] ? this.props.children : null}
      </div>
    );
  },

  styles () {
    return {
      component: Object.assign({}, {
        boxSizing: 'border-box',
        flexBasis: (this.props['column' + this.state.screenWidth] / this.props.columnCount * 100) + '%',
        flexGrow: 0,
        flexShrink: 0,
        marginLeft: (this.props['offset' + this.state.screenWidth] / this.props.columnCount * 100) + '%',
        order: this.props['order' + this.state.screenWidth],
        padding: '0 10px'
      }, this.props.style)
    };
  }
});

module.exports = Column;

@@ -1727,56 +1727,8 @@
 urn 
-(%0A      %3Cdiv style=%7Bstyles.component%7D%3E%0A        %7B
 this
@@ -1771,16 +1771,64 @@
 idth%5D ? 
+(%0A      %3Cdiv style=%7Bstyles.component%7D%3E%0A        %7B
 this.pro
@@ -1842,15 +1842,8 @@
 dren
- : null
 %7D%0A  
@@ -1857,17 +1857,26 @@
 iv%3E%0A    
-)
+  ) : null
 ;%0A  %7D,%0A%0A

move conditional to render nothing on 0