import { Badge, Text } from '@mantine/core';
import type { AdvancedColumn } from '@ema-platform/ui';
import {
  STATUS_COLORS,
  STATUS_LABELS,
  type LicenseApplication,
  type LicenseStatus,
} from '@ema-platform/api';

export const dashboardQueueColumns: AdvancedColumn<LicenseApplication>[] = [
  {
    header: 'Number',
    cell: ({ row }) => (
      <Text size="sm" fw={500}>
        {row.original.applicationNumber}
      </Text>
    ),
  },
  {
    header: 'Company',
    cell: ({ row }) => <Text size="sm">{row.original.companyName ?? '—'}</Text>,
  },
  {
    header: 'Status',
    cell: ({ row }) => (
      <Badge variant="light" color={STATUS_COLORS[row.original.status as LicenseStatus]}>
        {STATUS_LABELS[row.original.status as LicenseStatus]}
      </Badge>
    ),
  },
];
