import * as Vue from 'vue';
import { Asset } from '../Asset';
import { useTags } from '../headContentUtils';
import { RouterProvider } from '../RouterProvider';
import { Scripts } from '../Scripts';
const ServerHeadContent = Vue.defineComponent({
    name: 'ServerHeadContent',
    setup() {
        const getTags = useTags();
        return () => getTags().map((tag) => Vue.h(Asset, { key: tag.tag + tag.id, ...tag }));
    },
});
export const RouterServer = Vue.defineComponent({
    name: 'RouterServer',
    props: {
        router: {
            type: Object,
            required: true,
        },
    },
    setup(props) {
        return () => Vue.h('html', null, [
            Vue.h('head', null, [Vue.h(ServerHeadContent)]),
            Vue.h('body', null, [
                Vue.h('div', { id: '__app' }, [
                    Vue.h(RouterProvider, {
                        router: props.router,
                    }, {
                        innerWrap: (innerProps) => [
                            Vue.h(ServerHeadContent),
                            innerProps.children,
                            Vue.h(Scripts),
                        ],
                    }),
                ]),
            ]),
        ]);
    },
});
//# sourceMappingURL=RouterServer.jsx.map