import type { Interaction } from "./script/types" export const cSet = (...values: T[]) => new Set(values) export const cMap = (object: Record) => new Map(Object.entries(object)) export function getInteractionQueueItemId(interaction: Interaction) { let id: string if (interaction.type === "use") id = `use-${interaction.objectId}` else if (interaction.type === "combine") id = `combine-${[...interaction.objectIds].sort().join("_")}` else throw new Error("Unknown interaction type") return id }