/**
 * Modal system — the closed set of named feature modals (docs/architecture/03).
 *
 * Modelled as a closed union so the registry, coordinator, and shell are
 * exhaustively type-checked: a new modal that isn't handled everywhere fails to
 * compile. Confirmation/alert dialogs are deliberately NOT in this set — they
 * are a separate, lighter layer (see ConfirmStore) that may stack above a modal.
 */

export type ModalName =
  | 'datasets' // Datasets manager (list / detail / new-dataset form)
  | 'about' // About & Help (M6)
  | 'donate' // Support — feedback + Ukraine-defense donation (M6)
  | 'chartBuilder' // Visual no-JSON chart composition for a dataset (M4)
  | 'extract' // Extract inline spec data into a new dataset (M3)
  | 'themeBuilder'; // Custom chart theme editor with a live preview gallery (spec §04)
// Settings is NOT a modal — preferences are distributed to per-pane disclosure
// popovers (spec §07; see components/SettingsPopover).

/** The active modal, or `null` when none is open (at most one at a time, §01C). */
export type ActiveModal = ModalName | null;
