// Global Regulatory Harmonization Suite (GRHS) - Type Definitions

export enum HarmonizationPillar {
  MONETARY = 'MONETARY', // Pillar I
  LEGAL = 'LEGAL', // Pillar II
  COMPLIANCE = 'COMPLIANCE', // Pillar III
  TRADE = 'TRADE', // Pillar IV
}

export interface RegulatoryEquivalenceScore {
  sovereignBankId: string;
  compliance: number; // 0-100
  transparency: number; // 0-100
  amlStrength: number; // 0-100
  cbdcMaturity: number; // 0-100
  repScore: number; // Calculated: (compliance + transparency + amlStrength + cbdcMaturity) / 4
  equivalent: boolean; // repScore >= 95%
  calculatedAt: Date;
}

export interface HarmonizationRule {
  id: string;
  pillar: HarmonizationPillar;
  ruleCode: string;
  name: string;
  description: string;
  requirements: string[];
  applicableSovereigns: string[]; // Empty = all
  status: 'ACTIVE' | 'DRAFT' | 'SUSPENDED';
}

export interface FastTrackPrivilege {
  id: string;
  sovereignBankId: string;
  privilegeType: 'SETTLEMENT' | 'LIQUIDITY' | 'OVERSIGHT';
  grantedAt: Date;
  expiresAt?: Date;
  status: 'ACTIVE' | 'REVOKED' | 'EXPIRED';
}

export interface HarmonizationCompliance {
  id: string;
  sovereignBankId: string;
  pillar: HarmonizationPillar;
  complianceScore: number; // 0-100
  lastAssessment: Date;
  nextAssessment: Date;
  issues: string[];
  status: 'COMPLIANT' | 'NON_COMPLIANT' | 'PARTIAL';
}

