import { Routes } from "@angular/router";

import { ChatComponent } from "./chat/chat.component";
import { TicketsComponent } from "./ticketlist/tickets.component";
import { TicketdetailsComponent } from "./ticketdetails/ticketdetails.component";
import { TaskboardComponent } from "./taskboard/taskboard.component";
import { FullcalendarComponent } from "./fullcalendar/fullcalendar.component";
import { TodosComponent } from "./todos/todos.component";
import { NotesComponent } from "./notes/notes.component";
import { ContactComponent } from "./contact/contact.component";
import { ContactsComponent } from "./contacts/contacts.component";
import { TasksComponent } from "./tasks/tasks.component";
import { ContactListComponent } from "./contact-list/contact-list.component";
import { MailboxComponent } from "./mail/mailbox.component";
import { DetailComponent } from "./mail/detail/detail.component";
import { ComposeComponent } from "./mail/compose/compose.component";
import { ListUsersComponent } from "./users/list-users/list-users.component";

import { UserRxjsComponent } from "./user-rxjs/user-rxjs.component";
import { ContactRxjsComponent } from "./contact-rxjs/contact-rxjs.component";
import { ContactListRxjsComponent } from "./contact-list-rxjs/contact-list-rxjs.component";

import { ListInvoicesComponent } from "./invoice/list-invoices/list-invoices.component";
import { AddInvoiceComponent } from "./invoice/add-invoice/add-invoice.component";
import { ViewInvoiceComponent } from "./invoice/view-invoice/view-invoice.component";
import { EditInvoiceComponent } from "./invoice/edit-invoice/edit-invoice.component";

import { JobsListComponent } from "./jobs/jobs-list/jobs-list.component";
import { JobDetailComponent } from "./jobs/job-detail/job-detail.component";
import { JobApplyComponent } from "./jobs/job-apply/job-apply.component";
import { ListTemplateImportComponent } from "./users/list-template-import/list-template-import.component";
import { ListTemplateExportComponent } from "./users/list-template-export/list-template-export.component";
import { PortalCategoryManageComponent } from "./portal-category-manage/portal-category-manage.component";
import { PortalTemplateManageComponent } from "./portal-template-manage/portal-template-manage.component";
import { PortalCategoryListApproveComponent } from "./portal-category-list-approve/portal-category-list-approve.component";
import { PortalTemplateApproveComponent } from "./portal-template-approve/portal-template-approve.component";
import { PortalCategoryListComponent } from "./portal-category-list/portal-category-list.component";
import { PortalTemplateListComponent } from "./portal-template-list/portal-template-list.component";
import { PortalCreateCategoryComponent } from "./portal-create-category/portal-create-category.component";
import { ListDocComponent } from "./list-doc/list-doc.component";
import { ApproveExcelComponent } from "./approve-excel/approve-excel.component";
import { ListExcelComponent } from "./list-excell/list-excell.component";
import { ListCourseComponent } from "./list-course/list-course.component";
import { ApproveDocComponent } from "./approve-doc/approve-doc.component";
import { ApproveCourseComponent } from "./approve-course/approve-course.component";
import { ViewListCourseComponent } from "./view-list-course/view-list-course.component";
import { ViewListExcelComponent } from "./view-list-excel/view-list-excel.component";
import { ViewListDocComponent } from "./view-list-doc/view-list-doc.component";
import { ApprovedListComponent } from "./approved-list/approved-list.component";
import { ListWidgetsComponent } from "./list-widgets/list-widgets.component";
import { ViewListWidgetsComponent } from "./view-list-widgets/view-list-widgets.component";
import { ExcelReportComponent } from "./excel-report/excel-report.component";
import { ExcelListComponent } from "./excel-list/excel-list.component";
import { ExcelReportEmpviewComponent } from "./excel-report-empview/excel-report-empview.component";
import { ExcelReportToggleComponent } from "./excel-report-toggle/excel-report-toggle.component";
import { DatasourceTableComponent } from "./datasource-table/datasource-table.component";
export const AppsRoutes: Routes = [
  {
    path: "",
    children: [
      {
        path: "chat",
        component: ChatComponent,
        data: {
          title: "",
          urls: [],
        },
      },

      {
        path: "mail/:type",
        component: MailboxComponent,
        children: [
          { path: ":id", component: DetailComponent },
          { path: "/compose", component: ComposeComponent },
        ],
        data: {
          title: "",
          urls: [],
        },
      },

      {
        path: "ticket/ticketlist",
        component: TicketsComponent,
        data: {
          title: "Ticket List",
          urls: [
            { title: "Dashboard", url: "/dashboard" },
            { title: "Ticket List" },
          ],
        },
      },
      {
        path: "ticket/ticketdetails",
        component: TicketdetailsComponent,
        data: {
          title: "Ticket Details",
          urls: [
            { title: "Dashboard", url: "/dashboard" },
            { title: "Ticket Details" },
          ],
        },
      },
      {
        path: "taskboard",
        component: TaskboardComponent,
        data: {
          title: "Taskboard",
          urls: [
            { title: "Dashboard", url: "/dashboard" },
            { title: "Taskboard" },
          ],
        },
      },
      {
        path: "fullcalendar",
        component: FullcalendarComponent,
        data: {
          title: "Full-Calendar",
          urls: [
            { title: "Dashboard", url: "/dashboard" },
            { title: "Full-Calendar" },
          ],
        },
      },
      {
        path: "todo",
        component: TodosComponent,
        data: {
          title: "",
          urls: [],
        },
      },
      {
        path: "tasks",
        component: TasksComponent,
        data: {
          title: "",
          urls: [],
        },
      },
      {
        path: "contact-list",
        component: ContactListComponent,
        data: {
          title: "",
          urls: [],
        },
      },
      {
        path: "contact-list-rxjs",
        component: ContactListRxjsComponent,
        data: {
          title: "",
          urls: [],
        },
      },
      {
        path: "notes",
        component: NotesComponent,
        data: {
          title: "",
          urls: [],
        },
      },
      {
        path: "users",
        component: ListUsersComponent,
        data: {
          title: "Users App",
          urls: [
            { title: "Dashboard", url: "/dashboard" },
            { title: "Users App" },
          ],
        },
      },
      {
        path: "portal-category-manage",
        component: PortalCategoryManageComponent,
        data: {
          title: "Category Manage",
          urls: [
            { title: "Category Manage" },
          ],
        },
      },
      {
        path: "portal-template-manage",
        component: PortalTemplateManageComponent,
        data: {
          title: "Template Manage",
          urls: [
            { title: "Template Manage" },
          ],
        },
      },
      {
        path: "portal-category-list-approve",
        component: PortalCategoryListApproveComponent,
        data: {
          title: "รายการเอกสารรอการอนุมัติ",
          urls: [
            { title: "รายการเอกสารรอการอนุมัติ" },
          ],
        },
      },
      {
        path: "approve-excel",
        component: ApproveExcelComponent,
        data: {
          title: "อนุมัติ Excel",
          urls: [
            { title: "รายการเอกสารรอการอนุมัติ", url: "apps/portal-category-list-approve" },
            { title: "อนุมัติ Excel" },
          ],
        },
      },
      {
        path: "approve-doc",
        component: ApproveDocComponent,
        data: {
          title: "อนุมัติเอกสาร",
          urls: [
            { title: "รายการเอกสารรอการอนุมัติ", url: "apps/portal-category-list-approve" },
            { title: "อนุมัติเอกสาร" },
          ],
        },
      },
      {
        path: "approve-course",
        component: ApproveCourseComponent,
        data: {
          title: "อนุมัติหลักสูตร",
          urls: [
            { title: "รายการเอกสารรอการอนุมัติ", url: "apps/portal-category-list-approve" },
            { title: "อนุมัติหลักสูตร" },
          ],
        },
      },
      {
        path: "approved-list",
        component: ApprovedListComponent,
        data: {
          title: "รายการเอกสารผ่านการอนุมัติ",
          urls: [
            { title: "รายการเอกสารผ่านการอนุมัติ", url: "apps/portal-category-list-approve" },
            { title: "อนุมัติหลักสูตร" },
          ],
        },
      },
      {
        path: "portal-template-approve",
        component: PortalTemplateApproveComponent,
        data: {
          title: "Template List Approve",
          urls: [
            { title: "Template List Approve" },
          ],
        },
      },
      {
        path: "portal-category-list",
        component: PortalCategoryListComponent,
        data: {
          title: "รายการเอกสาร",
          urls: [
            { title: "รายการเอกสาร" },
          ],
        },
      },
      {
        path: "view-list-excel",
        component: ViewListExcelComponent,
        data: {
          title: "รายการ Excel",
          urls: [
            { title: "รายการเอกสาร", url: "apps/portal-category-list" },
            { title: "รายการ Excel" }
          ],
        },
      },
      {
        path: "view-list-excel/:type",
        component: ViewListExcelComponent,
        data: {
          title: "รายการ Excel",
          urls: [
            { title: "รายการเอกสาร", url: "apps/portal-category-list" },
            { title: "รายการ Excel" }
          ],
        },
      },
      {
        path: "view-list-doc",
        component: ViewListDocComponent,
        data: {
          title: "รายการเอกสาร",
          urls: [
            { title: "รายการเอกสาร", url: "apps/portal-category-list" },
            { title: "รายการเอกสาร" }
          ],
        },
      },
      {
        path: "view-list-doc/:type",
        component: ViewListDocComponent,
        data: {
          title: "รายการเอกสาร",
          urls: [
            { title: "รายการเอกสาร", url: "apps/portal-category-list" },
            { title: "รายการเอกสาร" }
          ],
        },
      },
      {
        path: "view-list-course",
        component: ViewListCourseComponent,
        data: {
          title: "รายการหลักสูตร",
          urls: [
            { title: "รายการเอกสาร", url: "apps/portal-category-list" },
            { title: "รายการหลักสูตร" }
          ],
        },
      },
      {
        path: "view-list-course/:type",
        component: ViewListCourseComponent,
        data: {
          title: "รายการหลักสูตร",
          urls: [
            { title: "รายการเอกสาร", url: "apps/portal-category-list" },
            { title: "รายการหลักสูตร" }
          ],
        },
      },
      {
        path: "view-list-widgets",
        component: ViewListWidgetsComponent,
        data: {
          title: "รายการวิทเจ็ท",
          urls: [
            { title: "รายการเอกสาร", url: "apps/portal-category-list" },
            { title: "รายการวิทเจ็ท" }
          ],
        },
      },
      {
        path: "portal-template-list",
        component: PortalTemplateListComponent,
        data: {
          title: "Template List",
          urls: [
            { title: "Template List" },
          ],
        },
      },
      {
        path: "portal-create-category",
        component: PortalCreateCategoryComponent,
        data: {
          title: "รายการอัพโหลดเอกสาร",
          urls: [
            { title: "รายการอัพโหลดเอกสาร" },
          ],
        },
      },
      {
        path: "import-template",
        component: ListTemplateImportComponent,
        data: {
          title: "Import Template",
          urls: [
            { title: "Import Template" },
          ],
        },
      },
      {
        path: "export-template",
        component: ListTemplateExportComponent,
        data: {
          title: "Export Template",
          urls: [
            { title: "Export Template" },
          ],
        },
      },
      {
        path: "list-doc",
        component: ListDocComponent,
        data: {
          title: "รายการเอกสาร",
          urls: [
            { title: "รายการอัพโหลดเอกสาร", url: "apps/portal-create-category" },
            { title: "รายการเอกสาร" },
          ],
        },
      },
      {
        path: "list-excel",
        component: ListExcelComponent,
        data: {
          title: "รายการ Excel",
          urls: [
            { title: "รายการอัพโหลดเอกสาร", url: "apps/portal-create-category" },
            { title: "รายการ Excel" },
          ],
        },
      },
      {
        path: "list-course",
        component: ListCourseComponent,
        data: {
          title: "รายการหลักสูตร",
          urls: [
            { title: "รายการอัพโหลดเอกสาร", url: "apps/portal-create-category" },
            { title: "รายการหลักสูตร" },
          ],
        },
      },
      {
        path: "list-widgets",
        component: ListWidgetsComponent,
        data: {
          title: "รายการวิทเจ็ท",
          urls: [
            { title: "รายการอัพโหลดเอกสาร", url: "apps/list-widgets" },
            { title: "รายการวิทเจ็ท" },
          ],
        },
      },
      {
        path: "usersrxjs",
        component: UserRxjsComponent,
        data: {
          title: "Users-Rxjs App",
          urls: [
            { title: "Apps", url: "/dashboard" },
            { title: "Users-Rxjs App" },
          ],
        },
      },
      {
        path: "contact-grid",
        component: ContactComponent,
        data: {
          title: "Contact Grid",
          urls: [
            { title: "Dashboard", url: "/dashboard" },
            { title: "Contact Grid" },
          ],
        },
      },
      {
        path: "contact",
        component: ContactsComponent,
        data: {
          title: "",
          urls: [],
        },
      },
      {
        path: "contactrxjs",
        component: ContactRxjsComponent,
        data: {
          title: "",
          urls: [],
        },
      },
      {
        path: "invoice",
        component: ListInvoicesComponent,
        data: {
          title: "Invoice",
          urls: [],
        },
      },
      {
        path: "addinvoice",
        component: AddInvoiceComponent,
        data: {
          title: "Add Invoice",
          urls: [],
        },
      },
      {
        path: "viewinvoice/:id",
        component: ViewInvoiceComponent,
        data: {
          title: "View Invoice",
          urls: [],
        },
      },
      {
        path: "editinvoice/:id",
        component: EditInvoiceComponent,
        data: {
          title: "",
          urls: [],
        },
      },
      {
        path: "jobs",
        component: JobsListComponent,
        data: {
          title: "Jobs",
          urls: [],
        },
      },
      {
        path: "job-detail/:id",
        component: JobDetailComponent,
        data: {
          title: "Jobs Details",
          urls: [],
        },
      },
      {
        path: "apply-job",
        component: JobApplyComponent,
        data: {
          title: "Apply Job",
          urls: [],
        },
      },
      {
        path: "excel-export/:id",
        component: ExcelReportComponent,
        data: {
          title: "รายงาน Excel",
          urls: [],
        },
      },
      {
        path: "excel-list",
        component: ExcelListComponent,
        data: {
          title: "เพิ่มรายงาน Excel",
          urls: [],
        },
      },
      {
        path: "excel-report-toggle",
        component: ExcelReportToggleComponent,
        data: {
          title: "เปิด-ปิด การใช้งานรายงาน Excel",
          urls: [],
        },
      },
      {
        path: "excel-report-empview",
        component: ExcelReportEmpviewComponent,
        data: {
          title: "รายงาน Excel สำหรับ Empview",
          urls: [],
        },
      },
      {
        path: "datasource-table",
        component: DatasourceTableComponent,
        data: {
          title: "Datasource Table",
          urls: [],
        },
      },
    ],
  },
];
