1"use strict"; 2Object.defineProperty(exports, "__esModule", { value: true }); 3exports.getRootComponent = void 0; 4/** 5 * Copyright © 2023 650 Industries. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */ 10const _ctx_html_1 = require("../../_ctx-html"); 11function getRootComponent() { 12 const keys = _ctx_html_1.ctx.keys(); 13 if (!keys.length) { 14 return require('./html').Html; 15 } 16 if (keys.length > 1) { 17 throw new Error(`Multiple components match the root HTML element: ${keys.join(', ')}`); 18 } 19 const exp = (0, _ctx_html_1.ctx)(keys[0]); 20 if (!exp.default) { 21 throw new Error(`The root HTML element "${keys[0]}" is missing the required default export.`); 22 } 23 return exp.default; 24} 25exports.getRootComponent = getRootComponent; 26//# sourceMappingURL=getRootComponent.js.map