import './body.css'
import {createBrowserRouter, RouterProvider} from 'react-router-dom';
import Index from '../../route/index';
import ProjCreate from "../../route/proj/ProjCreate.tsx";
import ProjNew from "../../route/proj/ProjNew.tsx";
import ProjEdit from "../../route/proj/ProjEdit.tsx";
import AgentSelect from "../../route/agent/AgentSelect.tsx";
import ProjEditStep1 from "../../route/proj/edit/ProjEditStep1.tsx";
import ProjEditStep2 from "../../route/proj/edit/ProjEditStep2.tsx";
import ProjEditStep3 from "../../route/proj/edit/ProjEditStep3.tsx";
import ProjEditStep4 from "../../route/proj/edit/ProjEditStep4.tsx";
import ProjEditStep5 from "../../route/proj/edit/ProjEditStep5.tsx";
import ProjEditStep6 from "../../route/proj/edit/ProjEditStep6.tsx";
import ProjConfigLoginpage from "../../route/proj/edit/ProjConfigLoginpage.tsx";
import ProjConfigModList from "../../route/proj/edit/ProjConfigModList.tsx";

const router = createBrowserRouter([
    {
        path: '/',
        element: <Index/>
    },
    {
        path: '/proj-create',
        element: <ProjCreate/>
    },
    {
        path: '/proj-new/:projChargeType',
        element: <ProjNew/>
    },
    {
        path: '/proj-edit/:projId',
        element: <ProjEdit/>
    },
    {
        path: '/proj-edit/step1/:projId',
        element: <ProjEditStep1/>
    },
    {
        path: '/proj-edit/step2/:projId',
        element: <ProjEditStep2/>
    },
    {
        path: '/proj-edit/step3/:projId',
        element: <ProjEditStep3/>
    },
    {
        path: '/proj-edit/step4/:projId',
        element: <ProjEditStep4/>
    },
    {
        path: '/proj-edit/step5/:projId',
        element: <ProjEditStep5/>
    },
    {
        path: '/proj-edit/step6/:projId',
        element: <ProjEditStep6/>
    },
    {
        path: '/proj-edit/config-loginpage/:projId',
        element: <ProjConfigLoginpage/>
    },
    {
        path: '/proj-edit/config-mod-list/:projId',
        element: <ProjConfigModList/>
    },
    {
        path: '/agent-select/:projId',
        element: <AgentSelect/>
    }
])

export default function Body() {
    const winHeight: number = window.innerHeight
    return (
        <div className="body" style={{height: `${winHeight - 145}px`}}>
            <RouterProvider router={router}/>
        </div>
    )
}