import * as icon from '@mdi/js';
import { MenuAsideItem } from './interfaces'

const menuAside: MenuAsideItem[] = [
  {
    href: '/dashboard',
    icon: icon.mdiViewGridOutline,
    label: 'Dashboard',
  },
  {
    label: 'Transactions',
    icon: icon.mdiCreditCardOutline,
    menu: [
      {
        href: '/transaction-entry',
        icon: icon.mdiCashRegister,
        label: 'Register Entry',
        permissions: 'CREATE_SALES_INVOICES'
      },
      {
        href: '/transactions',
        label: 'All Transactions',
        icon: icon.mdiViewList,
        permissions: 'READ_TRANSACTIONS'
      },
      {
        label: 'Registers / Lists',
        icon: icon.mdiFormatListBulleted,
        menu: [
          {
            href: '/sales_invoices/sales_invoices-list',
            label: 'Sales Invoices',
            permissions: 'READ_SALES_INVOICES'
          },
          {
            href: '/purchase_invoices/purchase_invoices-list',
            label: 'Purchase Invoices',
            permissions: 'READ_PURCHASE_INVOICES'
          },
          {
            href: '/expenses/expenses-list',
            label: 'Expenses',
            permissions: 'READ_EXPENSES'
          },
          {
            href: '/receipts/receipts-list',
            label: 'Receipts',
            permissions: 'READ_RECEIPTS'
          },
          {
            href: '/ocr_extractions/ocr_extractions-list',
            label: 'OCR Extractions',
            permissions: 'READ_OCR_EXTRACTIONS'
          }
        ]
      }
    ]
  },
  {
    label: 'Tax & Compliance',
    icon: icon.mdiFileCheckOutline,
    menu: [
      {
        href: '/tax_periods/tax_periods-list',
        label: 'Tax Transactions',
        icon: icon.mdiFormatListBulleted,
        permissions: 'READ_TAX_PERIODS'
      },
      {
        label: 'Tax Declarations',
        icon: icon.mdiFileDocumentOutline,
        menu: [
          {
            href: '/vat_declarations/vat_declarations-list',
            label: 'VAT Declarations',
            permissions: 'READ_VAT_DECLARATIONS'
          },
          {
            href: '/tot_declarations/tot_declarations-list',
            label: 'TOT Declarations',
            permissions: 'READ_TOT_DECLARATIONS'
          },
          {
            href: '/declaration_submissions/declaration_submissions-list',
            label: 'Declaration Submissions',
            permissions: 'READ_DECLARATION_SUBMISSIONS'
          }
        ]
      },
      {
        href: '/audit_events/audit_events-list',
        label: 'Monthly Report',
        icon: icon.mdiCalendarMonth,
        permissions: 'READ_AUDIT_EVENTS'
      }
    ]
  },
  {
    label: 'Reports',
    icon: icon.mdiChartDonut,
    menu: [
      {
        label: 'Financial Reports',
        icon: icon.mdiChartTimelineVariant,
        menu: [
          { href: '/financial-reports?tab=income-statement', label: 'Income Statement' },
          { href: '/financial-reports?tab=balance-sheet', label: 'Balance Sheet' },
          { href: '/financial-reports?tab=trial-balance', label: 'Trial Balance' },
          { href: '/financial-reports?tab=cash-flow', label: 'Cash Flow' },
          { href: '/financial-reports?tab=profit-loss', label: 'Profit & Loss' }
        ]
      },
      {
        label: 'Tax Reports',
        icon: icon.mdiFileChart,
      }
    ]
  },
  {
    label: 'Finance',
    icon: icon.mdiCalculator,
    menu: [
      {
        href: '/chart-of-accounts',
        label: 'Chart of Accounts',
        icon: icon.mdiBookOpenVariant,
      },
      {
        href: '/opening-balances',
        label: 'Opening Balances',
        icon: icon.mdiCurrencyUsd,
      },
      {
        href: '/accounts-configuration',
        label: 'Accounts Configuration',
        icon: icon.mdiCogOutline,
      },
      {
        href: '/accounting-period',
        label: 'Accounting Period',
        icon: icon.mdiCalendarClock,
      },
      {
        href: '/general-journal',
        label: 'General Journal',
        icon: icon.mdiFileEditOutline,
      },
      {
        href: '/general-ledger',
        label: 'General Ledger',
        icon: icon.mdiBookOutline,
      },
      {
        href: '/financial-reports?tab=trial-balance',
        label: 'Trial Balance',
        icon: icon.mdiScaleBalance,
      },
      {
        href: '/financial-reports?tab=income-statement',
        label: 'Income Statement',
        icon: icon.mdiChartLine,
      },
      {
        href: '/financial-reports?tab=cash-flow',
        label: 'Cash Flow Statement',
        icon: icon.mdiSync,
      }
    ]
  },
  {
    label: 'Master Data',
    icon: icon.mdiDatabase,
    menu: [
      {
        href: '/firms/firms-list',
        label: 'Firms',
        permissions: 'READ_FIRMS'
      },
      {
        href: '/merchants/merchants-list',
        label: 'Merchants',
        permissions: 'READ_MERCHANTS'
      },
      {
        href: '/customers/customers-list',
        label: 'Customers',
        permissions: 'READ_CUSTOMERS'
      },
      {
        href: '/suppliers/suppliers-list',
        label: 'Suppliers',
        permissions: 'READ_SUPPLIERS'
      },
      {
        href: '/products/products-list',
        label: 'Products',
        permissions: 'READ_PRODUCTS'
      }
    ]
  },
  {
    label: 'Management',
    icon: icon.mdiOfficeBuilding,
    menu: [
      {
        href: '/users/users-list',
        label: 'Users',
        icon: icon.mdiAccountGroup,
        permissions: 'READ_USERS'
      },
      {
        href: '/roles/roles-list',
        label: 'Roles',
        icon: icon.mdiShieldAccountVariantOutline,
        permissions: 'READ_ROLES'
      },
      {
        href: '/permissions/permissions-list',
        label: 'Permissions',
        icon: icon.mdiShieldAccountOutline,
        permissions: 'READ_PERMISSIONS'
      },
      {
        href: '/organizations/organizations-list',
        label: 'Organizations',
        icon: icon.mdiTable,
        permissions: 'READ_ORGANIZATIONS'
      },
      {
        href: '/messages/messages-list',
        label: 'Messages',
        icon: icon.mdiMessageText,
        permissions: 'READ_MESSAGES'
      },
      {
        href: '/profile',
        label: 'Profile',
        icon: icon.mdiAccountCircle,
      },
      {
        href: '/api-docs',
        target: '_blank',
        label: 'Swagger API',
        icon: icon.mdiFileCode,
        permissions: 'READ_API_DOCS'
      }
    ]
  }
]

export default menuAside
