{"size": 1118, "ext": "js", "max_stars_repo_path": "resources/js/vue-router.js", "max_stars_repo_name": "reda21/blog", "max_stars_repo_stars_event_min_datetime": "2020-05-11T02:00:24.000Z", "max_stars_repo_stars_event_max_datetime": "2020-05-11T02:00:24.000Z", "max_issues_repo_path": "resources/js/vue-router.js", "max_issues_repo_name": "reda21/blog", "max_issues_repo_issues_event_min_datetime": "2020-05-11T16:58:41.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-05T21:24:49.000Z", "max_forks_repo_path": "resources/js/vue-router.js", "max_forks_repo_name": "reda21/blog", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 5, "max_forks_count": null, "avg_line_length": 21.0943396226, "max_line_length": 60, "alphanum_fraction": 0.4409660107}
import Vue from "vue";
import VueRouter from "vue-router"
//conponent
import chatPage from "./components/chat/chatPage.vue"
import chatPageEmpty from "./components/chat/chatPageEmpty";

let myMixin;
if (typeof(isRouter) != "undefined" && isRouter) {
    Vue.use(VueRouter);

    let routes;
// 2. Define route components
    switch (isRouter) {
        case "chat":
            routes = [
                {
                    path: '/',
                    name: "chat",
                    component: chatPageEmpty
                },
                {
                    path: '/:slug',
                    name: "chat.show",
                    component: chatPage
                },
                {
                    path: '*',
                    redirect: '/'
                }

            ];
            break;
    }

    // 3. Create the router
    const router = new VueRouter({
        //     mode: 'hash',
        mode: 'history',
        base: BaseRouterUrl,
        routes
    });

    myMixin = {
        router
    };
} else {
    myMixin = {};
}

console.log({myMixin});

export default myMixin;
