export function createAwarenessService(args) {
    const providersByDomain = new Map(args.providers.map((provider) => [provider.domain, provider]));
    return {
        async collect(input) {
            const provider = providersByDomain.get(input.domain);
            if (!provider) {
                throw new Error(`No awareness provider registered for domain: ${input.domain}`);
            }
            return provider.collect(input);
        },
    };
}
//# sourceMappingURL=service.js.map