import type { SeoData } from '../../types.ts' interface RuntimeScriptOptions { runtimeHref: string searchHref: string searchEnabled: boolean components: string[] componentScripts: string[] layoutScript?: string title: string rel: string seo: SeoData } export function renderRuntimeScript({ runtimeHref, searchHref, searchEnabled, components, componentScripts, layoutScript = '', title, rel, seo, }: RuntimeScriptOptions): string { const searchSource = searchEnabled ? `() => import('${searchHref}').then((mod) => mod.searchIndex || [])` : '[]' const customComponentSources = JSON.stringify(componentScripts) const layoutScriptSource = JSON.stringify(layoutScript) return `` }