'use strict';

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

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

var _getClassName2 = require('babel-plugin-react-css-modules/dist/browser/getClassName');

var _getClassName3 = _interopRequireDefault(_getClassName2);

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

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

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 _styleModuleImportMap = {
  './section-column.scss': {
    'base': 'flive_section-column_base',
    'x-small-1': 'flive_section-column_x-small-1',
    'x-small-2': 'flive_section-column_x-small-2',
    'x-small-3': 'flive_section-column_x-small-3',
    'x-small-4': 'flive_section-column_x-small-4',
    'x-small-5': 'flive_section-column_x-small-5',
    'x-small-6': 'flive_section-column_x-small-6',
    'x-small-7': 'flive_section-column_x-small-7',
    'x-small-8': 'flive_section-column_x-small-8',
    'x-small-9': 'flive_section-column_x-small-9',
    'x-small-10': 'flive_section-column_x-small-10',
    'x-small-11': 'flive_section-column_x-small-11',
    'x-small-12': 'flive_section-column_x-small-12',
    'small-1': 'flive_section-column_small-1',
    'small-2': 'flive_section-column_small-2',
    'small-3': 'flive_section-column_small-3',
    'small-4': 'flive_section-column_small-4',
    'small-5': 'flive_section-column_small-5',
    'small-6': 'flive_section-column_small-6',
    'small-7': 'flive_section-column_small-7',
    'small-8': 'flive_section-column_small-8',
    'small-9': 'flive_section-column_small-9',
    'small-10': 'flive_section-column_small-10',
    'small-11': 'flive_section-column_small-11',
    'small-12': 'flive_section-column_small-12',
    'medium-1': 'flive_section-column_medium-1',
    'medium-2': 'flive_section-column_medium-2',
    'medium-3': 'flive_section-column_medium-3',
    'medium-4': 'flive_section-column_medium-4',
    'medium-5': 'flive_section-column_medium-5',
    'medium-6': 'flive_section-column_medium-6',
    'medium-7': 'flive_section-column_medium-7',
    'medium-8': 'flive_section-column_medium-8',
    'medium-9': 'flive_section-column_medium-9',
    'medium-10': 'flive_section-column_medium-10',
    'medium-11': 'flive_section-column_medium-11',
    'medium-12': 'flive_section-column_medium-12',
    'large-1': 'flive_section-column_large-1',
    'large-2': 'flive_section-column_large-2',
    'large-3': 'flive_section-column_large-3',
    'large-4': 'flive_section-column_large-4',
    'large-5': 'flive_section-column_large-5',
    'large-6': 'flive_section-column_large-6',
    'large-7': 'flive_section-column_large-7',
    'large-8': 'flive_section-column_large-8',
    'large-9': 'flive_section-column_large-9',
    'large-10': 'flive_section-column_large-10',
    'large-11': 'flive_section-column_large-11',
    'large-12': 'flive_section-column_large-12'
  }
};

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

var PropTypeColumns = _propTypes2.default.oneOf(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']);

var propTypes = {
  /** @ignore */
  className: _propTypes2.default.string,
  xs: PropTypeColumns,
  sm: PropTypeColumns,
  md: PropTypeColumns,
  lg: PropTypeColumns,
  component: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object, _propTypes2.default.func])
};
var defaultProps = {
  className: undefined,
  xs: null,
  sm: null,
  md: null,
  lg: null,
  component: 'div'
};

var Column = function Column(_ref) {
  var _classNames;

  var className = _ref.className,
      xs = _ref.xs,
      sm = _ref.sm,
      md = _ref.md,
      lg = _ref.lg,
      Component = _ref.component,
      props = _objectWithoutProperties(_ref, ['className', 'xs', 'sm', 'md', 'lg', 'component']);

  return _react2.default.createElement(Component, _extends({}, props, {
    className: (className ? className + ' ' : '') + (0, _getClassName3.default)((0, _classnames2.default)('base', (_classNames = {}, _defineProperty(_classNames, 'x-small-' + xs, xs), _defineProperty(_classNames, 'small-' + sm, sm), _defineProperty(_classNames, 'medium-' + md, md), _defineProperty(_classNames, 'large-' + lg, lg), _classNames)), _styleModuleImportMap)
  }));
};

Column.propTypes = propTypes;
Column.defaultProps = defaultProps;

exports.default = Column;
module.exports = exports['default'];