'use strict';

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

var _flexboxReact = require('flexbox-react');

var _flexboxReact2 = _interopRequireDefault(_flexboxReact);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _semanticUiReact = require('semantic-ui-react');

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

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 ThinCardDrawer = function ThinCardDrawer(props) {
  var children = props.children,
      expanded = props.expanded,
      expandGroupToggle = props.expandGroupToggle,
      rest = _objectWithoutProperties(props, ['children', 'expanded', 'expandGroupToggle']);

  return _react2.default.createElement(
    'div',
    rest,
    !expanded ? _react2.default.createElement(
      _flexboxReact2.default,
      {
        className: 'drawer',
        flexDirection: 'row',
        onClick: expandGroupToggle
      },
      _react2.default.createElement(
        _flexboxReact2.default,
        { className: 'drawer__expand_button' },
        _react2.default.createElement(
          _flexboxReact2.default,
          {
            alignItems: 'center',
            className: 'drawer__button',
            flexGrow: 2
          },
          'EXPAND'
        ),
        _react2.default.createElement(
          _flexboxReact2.default,
          null,
          _react2.default.createElement(_semanticUiReact.Icon, { className: 'ei arrow_carrot-down text-large' })
        )
      ),
      _react2.default.createElement(_flexboxReact2.default, { className: 'drawer__side', flexGrow: 3 })
    ) : _react2.default.createElement(
      'div',
      null,
      children,
      _react2.default.createElement(
        _flexboxReact2.default,
        {
          className: 'drawer',
          flexDirection: 'row',
          onClick: expandGroupToggle
        },
        _react2.default.createElement(
          _flexboxReact2.default,
          { className: 'drawer__collapse_button' },
          _react2.default.createElement(
            _flexboxReact2.default,
            {
              alignItems: 'center',
              className: 'drawer__button',
              flexGrow: 2
            },
            'COLLAPSE'
          ),
          _react2.default.createElement(
            _flexboxReact2.default,
            null,
            _react2.default.createElement(_semanticUiReact.Icon, { className: 'ei arrow_carrot-up text-large' })
          )
        ),
        _react2.default.createElement(_flexboxReact2.default, { className: 'drawer__side_blue', flexGrow: 3 })
      )
    )
  );
};

ThinCardDrawer.defaultProps = {
  expanded: false
};
ThinCardDrawer.propTypes = {
  expanded: _propTypes2.default.bool,
  expandGroupToggle: _propTypes2.default.func
};
exports.default = ThinCardDrawer;
//# sourceMappingURL=ThinCardDrawer.js.map