'use strict';

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

var _extends2 = require('babel-runtime/helpers/extends');

var _extends3 = _interopRequireDefault(_extends2);

exports.buildRootNode = buildRootNode;

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

function buildRootNode(rootId, rootProps) {
  var props = (0, _extends3.default)({}, rootProps);
  props.id = rootId;
  if (props.className) {
    props.class = props.className;
    delete props.className;
  }

  var propsString = '';
  for (var key in props) {
    if (!props.hasOwnProperty(key)) {
      continue;
    }

    var value = props[key];
    propsString += ' ' + key + '="' + value + '"';
  }

  return '<div' + propsString + '></div>';
}