import { html, render } from '../templater.js' async function Root (ctx, component, ...params) { const result = await ctx.render(component, ...params) const scripts = Array.from(result.js).join(';\n') const css = Array.from(result.css).join('\n') return html` ${Array.from(result.head).join('\n')} ${result.body} ${scripts ? `` : ''} ` } export function page(component, ...params) { return render(Root, component, ...params) }