// The frame scan's profiles (release 30, lane P): what a frame is read for. // Poker is the first; a profile is one entry here. import { POKER_PROFILE } from "./poker"; import type { FrameProfile } from "./types"; export const FRAME_PROFILES: Readonly>> = { poker: POKER_PROFILE as unknown as FrameProfile<{ phase: string }>, }; export const FRAME_PROFILE_IDS = Object.keys(FRAME_PROFILES); export function isFrameProfile(v: unknown): v is string { return typeof v === "string" && Object.prototype.hasOwnProperty.call(FRAME_PROFILES, v); } export function frameProfile(id: string): FrameProfile<{ phase: string }> { const p = FRAME_PROFILES[id]; if (!p) throw new Error(`"${id}" is not a frame-scan profile (${FRAME_PROFILE_IDS.join(", ")})`); return p; }