import questionNav from './questionNav.json';
import examNav from './examNav.json';
import practiceNav from './practiceNav.json';

export function breadcrumbSetter(locationPath) {
    switch(locationPath) {
        case "/allQuestions":
            return [
                {
                    path: '/',
                    breadcrumbName: "Questions",
                    children: questionNav

                },
                {
                    path: 'allQuestions',
                    breadcrumbName: "All Questions"
                }
            ];
            // break;
        case "/myQuestions":
            return [
                {
                    path: '/',
                    breadcrumbName: "Questions",
                    children: questionNav
                },
                {
                    path: 'myQuestions',
                    breadcrumbName: "My Questions"
                }
            ];
            // break;
        case "/addQuestion":
            return [
                {
                    path: '/',
                    breadcrumbName: "Questions",
                    children: questionNav
                },
                {
                    path: 'addQuestion',
                    breadcrumbName: "Create Question"
                }
            ];
            // break;
        case "/translateQuestion":
            return [
                {
                    path: '/',
                    breadcrumbName: "Questions",
                    children: questionNav
                },
                {
                    path: 'translateQuestion',
                    breadcrumbName: "Translate Question"
                }
            ];
            // break;
        case "/bookmarkQuestions":
            return [
                {
                    path: '/',
                    breadcrumbName: "Questions",
                    children: questionNav
                },
                {
                    path: 'bookmarkQuestions',
                    breadcrumbName: "Bookmark Questions"
                }
            ];
            // break;
        case "/draftQuestions":
            return [
                {
                    path: '/',
                    breadcrumbName: "Questions",
                    children: questionNav
                },
                {
                    path: 'draftQuestions',
                    breadcrumbName: "Draft Questions"
                }
            ];
            // break;
        case "/createExam":
            return [
                {
                    path: '/',
                    breadcrumbName: "Exam",
                    children: examNav
                },
                {
                    path: 'createExam',
                    breadcrumbName: "Create Exam"
                }
            ];
        case "/liveExam":
            return [
                {
                    path: '/',
                    breadcrumbName: "Exam",
                    children: examNav
                },
                {
                    path: 'liveExam',
                    breadcrumbName: "Live Exams"
                }
            ];
        case "/upcomingExam":
            return [
                {
                    path: '/',
                    breadcrumbName: "Exam",
                    children: examNav
                },
                {
                    path: 'upcomingExam',
                    breadcrumbName: "Upcoming Exams"
                }
            ];
        case "/expiredExams":
            return [
                {
                    path: '/',
                    breadcrumbName: "Exam",
                    children: examNav
                },
                {
                    path: 'expiredExams',
                    breadcrumbName: "Expired Exams"
                }
            ];
        case "/draftExams":
            return [
                {
                    path: '/',
                    breadcrumbName: "Exam",
                    children: examNav
                },
                {
                    path: 'draftExams',
                    breadcrumbName: "Draft Exams"
                }
            ];
        case "/createPractise":
            return [
                {
                    path: '/',
                    breadcrumbName: "Practice",
                    children: practiceNav
                },
                {
                    path: 'createPractise',
                    breadcrumbName: "Create Practise"
                }
            ];
        case "/livePractise":
            return [
                {
                    path: '/',
                    breadcrumbName: "Practice",
                    children: practiceNav
                },
                {
                    path: 'livePractise',
                    breadcrumbName: "Live Practises"
                }
            ];
        case "/upcomingPractise":
            return [
                {
                    path: '/',
                    breadcrumbName: "Practice",
                    children: practiceNav
                },
                {
                    path: 'upcomingPractise',
                    breadcrumbName: "Upcoming Practises"
                }
            ];
        case "/draftPractise":
            return [
                {
                    path: '/',
                    breadcrumbName: "Practice",
                    children: practiceNav
                },
                {
                    path: 'draftPractise',
                    breadcrumbName: "Draft Practises"
                }
            ];
        case "/createbatch":
            return [
                {
                    path: '/',
                    breadcrumbName: "Batch",
                    children: [
                        {
                            path: 'createbatch',
                            breadcrumbName: "Create Batch"
                        },
                        {
                            path: 'viewbatch',
                            breadcrumbName: "View Batch"
                        }
                    ]
                },
                {
                    path: 'createbatch',
                    breadcrumbName: "Create Batch"
                }
            ];
        case "/viewbatch":
            return [
                {
                    path: '/',
                    breadcrumbName: "Batch",
                    children: [
                        {
                            path: 'createbatch',
                            breadcrumbName: "Create Batch"
                        },
                        {
                            path: 'viewbatch',
                            breadcrumbName: "View Batch"
                        }
                    ]
                },
                {
                    path: 'viewbatch',
                    breadcrumbName: "View Batch"
                }
            ];
        case "/class":
            return [
                {
                    path: '/',
                    breadcrumbName: "Class",
                    children: [
                        {
                            path: 'class',
                            breadcrumbName: "Create Class"
                        },
                        {
                            path: 'viewclass',
                            breadcrumbName: "View Class"
                        }
                    ]
                },
                {
                    path: 'class',
                    breadcrumbName: "Create Class"
                }
            ];
        case "/viewclass":
            return [
                {
                    path: '/',
                    breadcrumbName: "Class",
                    children: [
                        {
                            path: 'class',
                            breadcrumbName: "Create Class"
                        },
                        {
                            path: 'viewclass',
                            breadcrumbName: "View Class"
                        }
                    ]
                },
                {
                    path: 'viewclass',
                    breadcrumbName: "View Class"
                }
            ];
        default:
            return [
                {
                    path: '/',
                    breadcrumbName: "Dashboard"
                }
            ];
    }
}