import * as tsplus_module_1 from "@tsplus/stdlib/collections/HashSet/empty";
import * as tsplus_module_2 from "@effect/core/stm/TRef/operations/make";
import * as tsplus_module_3 from "@effect/core/stm/STM/operations/map";
import * as tsplus_module_4 from "@effect/core/stm/STM/operations/flatMap";
import { InternalTHub } from "@effect/core/stm/THub/operations/_internal/InternalTHub";
/**
 * Creates a hub with the specified strategy.
 *
 * @tsplus static ets/THub/Ops make
 * @tsplus static ets/THub/Ops __call
 */

export function make(requestedCapacity, strategy) {
  return tsplus_module_4.flatMap_(tsplus_module_2.make(() => undefined), empty => tsplus_module_4.flatMap_(tsplus_module_2.make(() => 0), hubSize => tsplus_module_4.flatMap_(tsplus_module_2.make(() => empty), publisherHead => tsplus_module_4.flatMap_(tsplus_module_2.make(() => empty), publisherTail => tsplus_module_4.flatMap_(tsplus_module_2.make(() => 0), subscriberCount => tsplus_module_3.map_(tsplus_module_2.make(() => tsplus_module_1.empty()), subscribers => new InternalTHub(hubSize, publisherHead, publisherTail, requestedCapacity, strategy, subscriberCount, subscribers)))))));
}
//# sourceMappingURL=make.mjs.map