import type { SidebarData } from '@ui/components/layout/types'
import { Activity, CreditCard, FileBarChart2, Home, Landmark, LayoutDashboard, WalletCards } from 'lucide-react'

/**
 * Finance-app specific sidebar navigation.
 *
 * User info is intentionally left as placeholder — the actual user is
 * injected dynamically in the layout via Inertia shared props.
 */
export const financeSidebarData: SidebarData = {
  user: {
    name: 'User Keuangan',
    email: '',
    avatar: '',
  },
  teams: [
    {
      name: 'GMP Keuangan',
      logo: CreditCard,
      plan: 'Keuangan & Akuntansi',
    },
    {
      name: 'Menu Utama',
      logo: Home,
      plan: 'Dasboard SSO',
      url: `${
        import.meta.env.VITE_AUTH_APP_URL || 'http://localhost:8000'
      }/dashboard`,
    },
  ],
  navGroups: [
    {
      title: 'Umum',
      items: [
        {
          title: 'Dashboard',
          url: '/dashboard',
          icon: LayoutDashboard,
        },
      ],
    },
    {
      title: 'Keuangan',
      items: [
        {
          title: 'Data Master',
          icon: Landmark,
          items: [
            {
              title: 'Bank',
              url: '/department/finance/bank',
            },
            {
              title: 'Chart of Account (COA)',
              url: '/department/finance/chart-of-account',
            },
            {
              title: 'Akun Sumber',
              url: '/department/finance/source-account',
            },
            {
              title: 'Master Item',
              url: '/department/finance/items',
            },
            {
              title: 'Master Customer',
              url: '/department/finance/customers',
            },
          ],
        },
        {
          title: 'Transaksi',
          icon: WalletCards,
          items: [
            {
              title: 'Budget',
              url: '/department/finance/budget',
            },
            {
              title: 'Pengajuan Dana',
              url: '/department/finance/fund-request',
            },
          ],
        },
        {
          title: 'Pelaporan',
          icon: FileBarChart2,
          items: [
            {
              title: 'Cost Control',
              url: '/department/finance/reporting/budget-variance',
            },
            {
              title: 'Pengajuan Dana - Standar',
              url: '/department/finance/reporting/fund-request-service',
            },
            {
              title: 'Pengajuan Dana - Konsolidasi',
              url: '/department/finance/reporting/fund-request-service/consolidated',
            },
          ],
        },
      ],
    },
    {
      title: 'Pemantauan Accurate',
      items: [
        {
          title: 'Monitor Integrasi',
          url: '/monitoring/integrasi-accurate',
          icon: Activity,
        },
        {
          title: 'Integrasi Customer',
          url: '/monitoring/integrasi-accurate/customer-mapping',
          icon: Activity,
        },
        {
          title: 'Monitor Pembayaran',
          url: '/monitoring/pembayaran-accurate',
          icon: CreditCard,
        },
      ],
    },
  ],
}
