/*
 * Runtime Web – Unified Serverless Framework for Full-Stack TypeScript Applications
 * Documentation: https://runtimeweb.com/docs/getting-started
 *
 * @template: ai-chat
 */

import * as React from 'react';
import { RuntimeHeadManager } from '@worktif/runtime';
import { Outlet } from 'react-router';
import { ChatPage } from './components';

/**
 * Runtime Web routes definition for React Router v7.
 *
 * The root route provides a shared layout that mounts the RuntimeHeadManager
 * above the Outlet so SEO metadata are managed centrally for all child routes.
 */
export const routes = [
    {
        path: '/',
        id: 'root',
        Component: () => (
            <>
                <RuntimeHeadManager />
                <Outlet />
            </>
        ),
        children: [
            {
                path: '/',
                id: 'home',
                Component: ChatPage,
            },
            {
                path: '/chat',
                id: 'chat',
                Component: ChatPage,
            },
        ],
    },
];
