export interface ValueScoreBreakdown {
  skillDepth: number;      // 0-100: avg proficiency normalized
  skillBreadth: number;    // 0-100: skill count capped at 10
  costEfficiency: number;  // 0-100: inverse LCR vs org max
  chargeability: number;   // 0-100: actual vs target gap
  experience: number;      // 0-100: avg yearsExperience capped at 10yr
  total: number;           // 0-100: weighted composite
}

export interface WeekdayAvailability {
  monday: number;
  tuesday: number;
  wednesday: number;
  thursday: number;
  friday: number;
  saturday?: number;
  sunday?: number;
}

export interface SkillEntry {
  skill: string;
  category?: string;
  proficiency: 1 | 2 | 3 | 4 | 5;
  yearsExperience?: number;
  certified?: boolean;
  isMainSkill?: boolean;
}

export interface Resource {
  id: string;
  eid: string;
  displayName: string;
  email: string;
  chapter?: string | null;
  lcrCents: number;
  ucrCents: number;
  currency: string;
  chargeabilityTarget: number;
  availability: WeekdayAvailability;
  skills: SkillEntry[];
  dynamicFields: Record<string, unknown>;
  blueprintId?: string | null;
  isActive: boolean;
  createdAt: Date;
  updatedAt: Date;
  roles?: Array<{ roleId: string; isPrimary: boolean; role: { id: string; name: string; color: string | null } }>;
  portfolioUrl?: string | null;
  roleId?: string | null;
  aiSummary?: string | null;
  aiSummaryUpdatedAt?: Date | null;
  skillMatrixUpdatedAt?: Date | null;
  valueScore?: number | null;
  valueScoreBreakdown?: ValueScoreBreakdown | null;
  valueScoreUpdatedAt?: Date | null;
  isOwnedByCurrentUser?: boolean;
}
