export const GENERATED_ROLE_NAMES = Object.freeze({
  SUPER_ADMIN: 'Super Administrator',
  ADMIN: 'Administrator',
  PLATFORM_OWNER: 'Platform Owner',
  TENANT_DIRECTOR: 'Tenant Director',
  CAMPUS_MANAGER: 'Campus Manager',
  ACADEMIC_COORDINATOR: 'Academic Coordinator',
  FINANCE_OFFICER: 'Finance Officer',
});

/** Seeded roles referenced by name in code (distinct from product/staff roles). */
export const SPECIAL_ROLE_NAMES = Object.freeze({
  /** Fallback role used for requests without an assigned role. */
  PUBLIC: 'Public',
  /** Default role assigned to a newly created user. */
  DEFAULT_USER: 'User',
});

export const PRODUCT_ROLE_VALUES = Object.freeze({
  TEACHER: 'teacher',
  PARA: 'para',
  OFFICE: 'office',
  DIRECTOR: 'director',
  SUPERINTENDENT: 'superintendent',
});

export type ProductRoleValue =
  (typeof PRODUCT_ROLE_VALUES)[keyof typeof PRODUCT_ROLE_VALUES];

export const GENERATED_ROLE_TO_PRODUCT_ROLE: Record<string, ProductRoleValue> =
  Object.freeze({
    [GENERATED_ROLE_NAMES.SUPER_ADMIN]: PRODUCT_ROLE_VALUES.SUPERINTENDENT,
    [GENERATED_ROLE_NAMES.ADMIN]: PRODUCT_ROLE_VALUES.SUPERINTENDENT,
    [GENERATED_ROLE_NAMES.PLATFORM_OWNER]: PRODUCT_ROLE_VALUES.SUPERINTENDENT,
    [GENERATED_ROLE_NAMES.TENANT_DIRECTOR]: PRODUCT_ROLE_VALUES.DIRECTOR,
    [GENERATED_ROLE_NAMES.CAMPUS_MANAGER]: PRODUCT_ROLE_VALUES.DIRECTOR,
    [GENERATED_ROLE_NAMES.ACADEMIC_COORDINATOR]: PRODUCT_ROLE_VALUES.TEACHER,
    [GENERATED_ROLE_NAMES.FINANCE_OFFICER]: PRODUCT_ROLE_VALUES.OFFICE,
  });

export const STAFF_TYPE_TO_PRODUCT_ROLE: Record<string, ProductRoleValue> =
  Object.freeze({
    teacher: PRODUCT_ROLE_VALUES.TEACHER,
    admin: PRODUCT_ROLE_VALUES.OFFICE,
    support: PRODUCT_ROLE_VALUES.PARA,
  });
