// Detective's checklist: the "what do I do next" rail. Four objectives derived // entirely from game state; the ACCUSE step pulses when the player is ready. import { useState } from 'preact/hooks' import { HOT_SUSPICION, useGame } from '../store' import { Btn } from './components' function useObjectives() { const g = useGame() const c = g.case const questioned = c.suspects.filter((s) => (g.state.interrogations[s.id] || []).length > 1).length const presented = Object.values(g.state.usedEv).some((l) => l.length > 0) const crackedAny = Object.values(g.state.cracked).some(Boolean) const hot = Object.values(g.state.suspicion).some((v) => v >= HOT_SUSPICION) const ready = (questioned >= c.suspects.length && presented && crackedAny) || hot return { g, total: c.suspects.length, questioned, presented, crackedAny, ready } } function Step({ done, label }: { done: boolean; label: string }) { return (