// LANE-DOOR type extensions. CCR-1 (PatronFlags.handHolding) and CCR-2
// (VerdictOutcome.hypeDelta) were folded into data/types.ts at the Phase-1
// review — this file now only holds door-domain types.

import type { HeatStrike, Patron, VerdictOutcome } from '../data/types';

/**
 * A consequence that lands LATER: Dazza does a lap and spots the bloke in
 * thongs you waved through, the inspector audits at 3 AM. Deferred hits are the
 * reason admitting is scary — the cost never arrives while you can still argue.
 */
export interface DeferredHit {
  /** clock-minute at which this fires (absolute, not relative). */
  atClockMin: number;
  vibeDelta?: number;
  aggroDelta?: number;
  dazzaText?: string;
  heatStrike?: HeatStrike;
  /** why, for the incident log + night summary */
  reason: string;
  patronId: string;
}

/**
 * Structurally a VerdictOutcome (so it drops straight into the `door:verdict`
 * event payload), plus the deferred tail that the night shell schedules.
 */
export interface DoorOutcome extends VerdictOutcome {
  deferred?: DeferredHit[];
  /** short line shown on the verdict toast — player-facing feedback. */
  note?: string;
}

/** Everything judge() needs to score a call. Pure data — no Phaser, no scene. */
export interface JudgeContext {
  clockMin: number;
  nightDate: Date;
  /** 0..1 roll used for the "Dazza does a lap" delay; caller passes rng.next(). */
  lapRoll: number;
  insideCount: number;
  licensed: number;
}

/** Result of a sobriety test the player has already ruled on. */
export type SobrietyRuling = 'pass' | 'fail';

export type { Patron };
