import { useContext } from "react";
import { FactoryContext } from "../providers/factory-provider.js";
export function useEventFactory(require = true) {
    const factory = useContext(FactoryContext);
    if (!require && !factory)
        throw new Error("Missing EventFactoryProvider");
    return factory;
}
