import type { PlayOptions, SoundName } from "cuelume"; /** The interaction sounds (cuelume) play at this volume. */ const VOLUME = 0.7; let cuelume: Promise | undefined; export const loadSounds = () => (cuelume ??= import("cuelume").then((module) => { module.setVolume(VOLUME); return module; })); export const play = (sound: SoundName, options?: PlayOptions) => { void loadSounds().then((module) => module.play(sound, options)); };