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