// app/hail/hail-ui.js — shared UI vocabulary for HAIL surfaces.
//
// Pure constants safe to import from both server components and client
// components. Re-derives display metadata from the canonical lib/hail enums so
// the UI never drifts from the domain vocabulary.

import { INTERVIEW_SECTIONS, SENSITIVITY_CLASSES } from '../../lib/hail/constants.js';

export const INSTITUTION_TYPES = [
  'Founder / Chairman',
  'Family Office / UHNW principal',
  'Regulated firm',
  'Holding company / group',
  'Senior advisor / counsel',
  'Institution',
];

export { INTERVIEW_SECTIONS };

// Sensitivity options with display label + tone for the capture selector.
// Tone drives the badge colour; `restricted`/`refused` are visually distinct.
export const SENSITIVITY_OPTIONS = [
  { value: 'public', label: 'Public', tone: 'neutral' },
  { value: 'internal', label: 'Internal', tone: 'info' },
  { value: 'confidential', label: 'Confidential', tone: 'info' },
  { value: 'restricted', label: 'Restricted (local-only)', tone: 'danger' },
  { value: 'refused', label: 'Declined (do not store)', tone: 'warning' },
];

export const SENSITIVITY_LABEL = Object.fromEntries(SENSITIVITY_OPTIONS.map((o) => [o.value, o.label]));
export const SENSITIVITY_TONE = Object.fromEntries(SENSITIVITY_OPTIONS.map((o) => [o.value, o.tone]));

export const CONFIDENCE_OPTIONS = [
  { value: '', label: '—' },
  { value: 'observed', label: 'Observed' },
  { value: 'inferred', label: 'Inferred' },
  { value: 'needs_confirmation', label: 'Needs confirmation' },
];

// Guard: keep this list in lockstep with the canonical enum.
export const ALL_SENSITIVITY = SENSITIVITY_CLASSES;
