mount = (component, id) => {
  const container = document.createDocumentFragment()
  const slot = typeof id === 'string' ? document.getElementById(id) : id;
  const rendered =
    (component instanceof _component_Component__WEBPACK_IMPORTED_MODULE_0__["default"] || component.render) ? component.render() : component;

  if (Array.isArray(rendered)) {
    for (var i = 0; i < rendered.length; i++) {
      mount(rendered[i], container);
    }
  } else {
    // Mount to container
    Object(_r_appendChild__WEBPACK_IMPORTED_MODULE_1__["default"])(container)(rendered);
  }

  // Mount to element
  slot.appendChild(container);

  if (typeof slot.destroy !== 'function') {
    slot.destroy = () => {
      for (var i = 0; i < rendered.length; i++) {
        _r_utils_fuseDom__WEBPACK_IMPORTED_MODULE_2__["default"].destroy(rendered[i]);
      }
    }
  }

  if (typeof component.mount === 'function') component.mount();

  return slot;
}
@param {Component} component
@param {string} id
@returns {HTMLElement|Node}