import { CombatantState } from "./CombatantState" ; import { Listable } from "./Listable" ; import { probablyUniqueString } from "./Toolbox" ; export interface SavedEncounter extends Listable { Combatants : CombatantState [ ] ; BackgroundImageUrl ? : string ; } export namespace SavedEncounter { export function GetSearchHint ( encounterState ) { return encounterState . Combatants . map ( c => c . Alias ) . join ( " " ) ; } export function Default ( ) { return { Combatants : [ ] , Id : probablyUniqueString ( ) , Name : "" , Path : "" , Version : process . env . VERSION || "0.0.0" } ; } }