'use strict';

Object.defineProperty(exports, '__esModule', {
  value: true
});
exports['default'] = createElement;

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

var _virtualDomCreateElement = require('virtual-dom/create-element');

var _virtualDomCreateElement2 = _interopRequireDefault(_virtualDomCreateElement);

var _refsStack = require('./refs-stack');

var _refsStack2 = _interopRequireDefault(_refsStack);

function createElement(component) {
  component.refs = {};
  component.virtualElement = component.render();
  _refsStack2['default'].push(component.refs);
  component.element = (0, _virtualDomCreateElement2['default'])(component.virtualElement);
  _refsStack2['default'].pop();
  return component.element;
}

module.exports = exports['default'];