import type { soundAlert } from "web/alerts/types";
import type { AlertRunner } from "./index";

export default async function execute(alert: soundAlert): Promise<AlertRunner> {
	const audio = new Audio(`/alerts/assets/${alert.sound}.ogg`);
	audio.play();
	return {
		blocking: false,
		duration: 1,
		alertDiv: document.createElement("div"),
	};
}
