import { type CombatantId, type DomainError, type DomainEvent, setTempHp, } from "@initiative/domain"; import type { EncounterStore } from "./ports.js"; import { runEncounterAction } from "./run-encounter-action.js"; export function setTempHpUseCase( store: EncounterStore, combatantId: CombatantId, tempHp: number | undefined, ): DomainEvent[] | DomainError { return runEncounterAction(store, (encounter) => setTempHp(encounter, combatantId, tempHp), ); }