import { RouterView } from 'vue-router';

export default {
    name: 'Ticket',
    path: '/ticket',
    meta: {
        title: 'tickets',
        icon: 'vn:ticket',
        moduleName: 'Ticket',
    },
    component: RouterView,
    redirect: { name: 'TicketMain' },
    menus: {
        main: ['TicketList'],
        card: ['TicketBoxing', 'TicketSms'],
    },
    children: [
        {
            name: 'TicketMain',
            path: '',
            component: () => import('src/pages/Ticket/TicketMain.vue'),
            redirect: { name: 'TicketList' },
            children: [
                {
                    name: 'TicketList',
                    path: 'list',
                    meta: {
                        title: 'list',
                        icon: 'view_list',
                    },
                    component: () => import('src/pages/Ticket/TicketList.vue'),
                },
                {
                    name: 'TicketCreate',
                    path: 'create',
                    meta: {
                        title: 'createTicket',
                        icon: 'vn:ticketAdd',
                        roles: ['developer'],
                    },
                    component: () => import('src/pages/Ticket/TicketList.vue'),
                },
            ],
        },
        {
            name: 'TicketCard',
            path: ':id',
            component: () => import('src/pages/Ticket/Card/TicketCard.vue'),
            redirect: { name: 'TicketSummary' },
            children: [
                {
                    name: 'TicketSummary',
                    path: 'summary',
                    meta: {
                        title: 'summary',
                        icon: 'launch',
                    },
                    component: () => import('src/pages/Ticket/Card/TicketSummary.vue'),
                },
                {
                    name: 'TicketBasicData',
                    path: 'basic-data',
                    meta: {
                        title: 'basicData',
                        icon: 'vn:settings',
                    },
                    component: () => import('src/pages/Ticket/Card/TicketBasicData.vue'),
                },
                {
                    path: 'boxing',
                    name: 'TicketBoxing',
                    meta: {
                        title: 'boxing',
                        icon: 'vn:package',
                    },
                    component: () => import('src/pages/Ticket/Card/TicketBoxing.vue'),
                },
                {
                    path: 'sms',
                    name: 'TicketSms',
                    meta: {
                        title: 'sms',
                        icon: 'sms',
                    },
                    component: () => import('src/pages/Ticket/Card/TicketSms.vue'),
                },
            ],
        },
    ],
};
