// Claim Management Database for Royal Enfield Approval Portal
// This database is exclusively for claim management requests created via ClaimManagementWizard
// Template: Claim Management (8-step workflow)

export const CLAIM_MANAGEMENT_DATABASE: any = {
  'RE-REQ-2024-CM-001': {
    id: 'RE-REQ-2024-CM-001',
    title: 'Dealer Marketing Activity Claim - Diwali Festival Campaign',
    description: 'Claim request for dealer-led Diwali festival marketing campaign including showroom decoration, test ride events, customer engagement activities, and promotional merchandise distribution. Activity conducted at Royal Motors Mumbai dealership.',
    category: 'Dealer Operations',
    subcategory: 'Claim Management',
    status: 'pending',
    priority: 'standard',
    amount: 'TBD',
    slaProgress: 35,
    slaRemaining: '4 days 12 hours',
    slaEndDate: 'Oct 16, 2024 5:00 PM',
    currentStep: 1,
    totalSteps: 8,
    template: 'claim-management',
    templateName: 'Claim Management',
    initiator: {
      name: 'Sneha Patil',
      role: 'Regional Marketing Coordinator',
      department: 'Marketing - West Zone',
      email: 'sneha.patil@royalenfield.com',
      phone: '+91 98765 43250',
      avatar: 'SP'
    },
    department: 'Marketing - West Zone',
    createdAt: 'Oct 7, 2024 9:30 AM',
    updatedAt: 'Oct 7, 2024 9:30 AM',
    dueDate: '2024-10-16T17:00:00Z',
    conclusionRemark: '',
    claimDetails: {
      activityName: 'Diwali Festival Campaign 2024',
      activityType: 'Marketing Activity',
      activityDate: 'Oct 5, 2024',
      location: 'Mumbai, Maharashtra',
      dealerCode: 'RE-MH-001',
      dealerName: 'Royal Motors Mumbai',
      dealerEmail: 'dealer@royalmotorsmumbai.com',
      dealerPhone: '+91 98765 12345',
      dealerAddress: '123 Main Street, Andheri West, Mumbai, Maharashtra 400053',
      requestDescription: 'Marketing campaign for Diwali festival including showroom decoration, test ride events, customer engagement activities, and promotional merchandise distribution at Royal Motors Mumbai dealership.',
      estimatedBudget: '₹2,45,000',
      periodStart: 'Oct 1, 2024',
      periodEnd: 'Oct 10, 2024'
    },
    approvalFlow: [
      {
        step: 1,
        approver: 'Royal Motors Mumbai (Dealer)',
        role: 'Dealer - Document Upload',
        status: 'pending',
        tatHours: 72,
        elapsedHours: 12,
        assignedAt: '2024-10-07T09:30:00Z',
        comment: null,
        timestamp: null,
        description: 'Dealer uploads proposal document, cost breakup, timeline for closure, and other supporting documents'
      },
      {
        step: 2,
        approver: 'Sneha Patil (Initiator)',
        role: 'Initiator Evaluation',
        status: 'waiting',
        tatHours: 48,
        elapsedHours: 0,
        assignedAt: null,
        comment: null,
        timestamp: null,
        description: 'Initiator reviews dealer documents and approves or requests modifications'
      },
      {
        step: 3,
        approver: 'System Auto-Process',
        role: 'IO Confirmation',
        status: 'waiting',
        tatHours: 1,
        elapsedHours: 0,
        assignedAt: null,
        comment: null,
        timestamp: null,
        description: 'Automatic IO (Internal Order) confirmation generated upon initiator approval'
      },
      {
        step: 4,
        approver: 'Rajesh Kumar',
        role: 'Department Lead Approval',
        status: 'waiting',
        tatHours: 72,
        elapsedHours: 0,
        assignedAt: null,
        comment: null,
        timestamp: null,
        description: 'Department head approves and blocks budget in IO for this activity'
      },
      {
        step: 5,
        approver: 'Royal Motors Mumbai (Dealer)',
        role: 'Dealer - Completion Documents',
        status: 'waiting',
        tatHours: 120,
        elapsedHours: 0,
        assignedAt: null,
        comment: null,
        timestamp: null,
        description: 'Dealer submits activity completion documents and description'
      },
      {
        step: 6,
        approver: 'Sneha Patil (Initiator)',
        role: 'Initiator Verification',
        status: 'waiting',
        tatHours: 48,
        elapsedHours: 0,
        assignedAt: null,
        comment: null,
        timestamp: null,
        description: 'Initiator verifies completion documents and can modify approved amount'
      },
      {
        step: 7,
        approver: 'System Auto-Process',
        role: 'E-Invoice Generation',
        status: 'waiting',
        tatHours: 1,
        elapsedHours: 0,
        assignedAt: null,
        comment: null,
        timestamp: null,
        description: 'Auto-generate e-invoice based on final approved amount'
      },
      {
        step: 8,
        approver: 'Meera Patel',
        role: 'Finance - Credit Note Issuance',
        status: 'waiting',
        tatHours: 48,
        elapsedHours: 0,
        assignedAt: null,
        comment: null,
        timestamp: null,
        description: 'Finance team issues credit note to dealer'
      }
    ],
    documents: [
      { name: 'Claim_Proposal_Diwali_2024.pdf', size: '1.8 MB', type: 'PDF', uploadedBy: 'Sneha Patil', uploadedAt: 'Oct 7, 2024 9:35 AM' },
      { name: 'Cost_Breakup_Detailed.xlsx', size: '450 KB', type: 'Excel', uploadedBy: 'Sneha Patil', uploadedAt: 'Oct 7, 2024 9:38 AM' },
      { name: 'Activity_Timeline.pdf', size: '320 KB', type: 'PDF', uploadedBy: 'Sneha Patil', uploadedAt: 'Oct 7, 2024 9:40 AM' }
    ],
    spectators: [
      { name: 'Arjun Menon', role: 'Brand Manager', avatar: 'AM' },
      { name: 'Finance Team', role: 'Budget Monitoring', avatar: 'FT' }
    ],
    auditTrail: [
      { type: 'created', action: 'Claim Request Created', details: 'Diwali festival campaign claim initiated using Claim Management template', user: 'Sneha Patil', timestamp: 'Oct 7, 2024 9:30 AM' },
      { type: 'assignment', action: 'Assigned to Dealer', details: 'Dealer Royal Motors Mumbai assigned for document upload', user: 'System', timestamp: 'Oct 7, 2024 9:31 AM' },
      { type: 'status_change', action: 'Workflow Started', details: 'Step 1: Dealer document upload phase initiated', user: 'System', timestamp: 'Oct 7, 2024 9:31 AM' }
    ],
    tags: ['claim-management', 'dealer-activity', 'marketing', 'diwali-campaign', 'template']
  }
};

// API Endpoints for Claim Management (to be implemented with backend)
export const CLAIM_MANAGEMENT_API_ENDPOINTS = {
  CREATE_CLAIM: '/api/v1/claim-management/create',
  UPDATE_CLAIM: '/api/v1/claim-management/update',
  GET_CLAIM: '/api/v1/claim-management/get',
  LIST_CLAIMS: '/api/v1/claim-management/list',
  UPLOAD_DEALER_DOCUMENTS: '/api/v1/claim-management/dealer/upload-documents',
  INITIATOR_EVALUATE: '/api/v1/claim-management/initiator/evaluate',
  GENERATE_IO: '/api/v1/claim-management/system/generate-io',
  DEPARTMENT_APPROVAL: '/api/v1/claim-management/department/approve',
  UPLOAD_COMPLETION_DOCS: '/api/v1/claim-management/dealer/completion-documents',
  INITIATOR_VERIFY: '/api/v1/claim-management/initiator/verify',
  GENERATE_EINVOICE: '/api/v1/claim-management/system/generate-einvoice',
  ISSUE_CREDIT_NOTE: '/api/v1/claim-management/finance/credit-note',
  GET_AUDIT_TRAIL: '/api/v1/claim-management/audit-trail',
  ADD_SPECTATOR: '/api/v1/claim-management/spectators/add',
  REMOVE_SPECTATOR: '/api/v1/claim-management/spectators/remove'
};
