'use strict';

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

var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
var React = require('react');
var CellTextboxLabel = require('../CellTextboxLabel/CellTextboxLabel.js');
var CellTextboxTitle = require('../CellTextboxTitle/CellTextboxTitle.js');
var CellTextboxSubtitle = require('../CellTextboxSubtitle/CellTextboxSubtitle.js');
var index = require('../../../../utils/index.js');
var CellTextbox_styles = require('./CellTextbox.styles.js');

function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }

var React__default = /*#__PURE__*/_interopDefault(React);

var _excluded = ["label", "title", "subtitle", "children", "className"];
var CellTextbox = function CellTextbox(_ref) {
  var label = _ref.label,
    title = _ref.title,
    subtitle = _ref.subtitle,
    children = _ref.children,
    className = _ref.className,
    rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
  return (
    /*#__PURE__*/
    // TODO: #1548
    React__default.default.createElement(CellTextbox_styles.CellTextboxStyled, _rollupPluginBabelHelpers.extends({
      className: index.cx('cell-textbox', className)
    }, rest), label || title || subtitle ? /*#__PURE__*/React__default.default.createElement(React__default.default.Fragment, null, label && /*#__PURE__*/React__default.default.createElement(CellTextboxLabel.CellTextboxLabel, null, label), title && /*#__PURE__*/React__default.default.createElement(CellTextboxTitle.CellTextboxTitle, null, title), subtitle && /*#__PURE__*/React__default.default.createElement(CellTextboxSubtitle.CellTextboxSubtitle, null, subtitle)) : children)
  );
};

exports.CellTextbox = CellTextbox;
