'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _immutable = require('immutable');

var _immutable2 = _interopRequireDefault(_immutable);

var _transformimeReact = require('transformime-react');

var _display = require('./display');

var _display2 = _interopRequireDefault(_display);

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

function TogglableDisplay(props) {
  if (!props.isHidden) {
    return _react2.default.createElement(_display2.default, {
      outputs: props.outputs,
      displayOrder: props.displayOrder,
      transforms: props.transforms,
      theme: props.theme
    });
  }
  return null;
}

TogglableDisplay.propTypes = {
  displayOrder: _react2.default.PropTypes.instanceOf(_immutable2.default.List),
  outputs: _react2.default.PropTypes.instanceOf(_immutable2.default.List),
  transforms: _react2.default.PropTypes.instanceOf(_immutable2.default.Map),
  isHidden: _react2.default.PropTypes.bool,
  theme: _react2.default.PropTypes.string
};

TogglableDisplay.defaultProps = {
  transforms: _transformimeReact.transforms,
  displayOrder: _transformimeReact.displayOrder
};