import Login from '../views/Login.vue';
import Home from '../views/Home.vue';
// import Register from '../views/Register.vue';
import ChangePassword from '../views/ChangePassword.vue';
import Main from '../views/Main.vue';

import EditWorkList from '../components/EditWorkList.vue';
import RegisterPatient from '../components/RegisterPatient.vue';
// import WorkList from '../components/Worklist.vue';
import HisLink from '../components/HisLink.vue';
import DeviceMap from '../components/DeviceMap.vue';
import Client from '../components/Client.vue';

import Users from '../components/Users.vue';
import UserSetting from '../components/UserSetting.vue';
import RegisterRoute from '../components/RegisterRoute.vue';
import TransliterationRoute from '../components/TransliterationRoute.vue';

import AppVersion from '../views/AppVersion.vue';

const routes = [{
        path: '/',
        component: Home,
        name: 'Home'
    },
    {
        path: '/appversion',
        component: AppVersion,
        name: 'AppVersion'
    },
    {
        path: '/signin',
        component: Login,
        name: 'signin'
    },
    // {
    //     path: '/signup',
    //     component: Register,
    //     name: 'signup'
    // },
    {
        path: '/changePassword',
        component: ChangePassword,
        name: 'changePassword'
    }, {
        path: '/main',
        component: Main,
        name: 'main',
        children: [{
            path: "worklist",
            name: "worklist",
            components: {
                // default: WorkList,
                default: () =>
                    import ('../components/Worklist.vue'),
                register_patient: RegisterPatient
                    // edit_worklist: WorkList
            }
        }, {
            path: "hislink",
            name: "hislink",
            component: HisLink
                // component: () =>
                //     import ('../components/HisLink.vue')
        }, {
            path: "devicemap",
            name: "devicemap",
            component: DeviceMap
        }, {
            path: "client",
            name: "client",
            component: Client
        }, {
            path: "users",
            name: "users",
            component: Users
        }, {
            path: "usersetting",
            name: "usersetting",
            component: UserSetting
        }, {
            path: "register",
            name: "register",
            component: RegisterRoute
        }, {
            path: "transliteration",
            name: "transliteration",
            component: TransliterationRoute
        }]
    }
];

export default routes;