import * as tsplus_module_1 from "@effect/core/io/Ref/operations/make";
import * as tsplus_module_2 from "@effect/core/io/Hub/operations/unbounded";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/struct";
import * as tsplus_module_4 from "@effect/core/io/Effect/operations/map";
import * as tsplus_module_5 from "@effect/core/io/Effect/operations/suspendSucceed";
import { SubscriptionRefInternal } from "@effect/core/stream/SubscriptionRef/operations/_internal/SubscriptionRefInternal";
/**
 * Creates a new `SubscriptionRef` with the specified value.
 *
 * @tsplus static ets/SubscriptionRef/Ops make
 * @tsplus static ets/SubscriptionRef/Ops __call
 */

export function make(value, __tsplusTrace) {
  return tsplus_module_5.suspendSucceed(() => tsplus_module_4.map_(tsplus_module_3.struct({
    ref: tsplus_module_1.makeSynchronized(value, __tsplusTrace),
    hub: tsplus_module_2.unbounded(__tsplusTrace)
  }, __tsplusTrace), ({
    hub,
    ref
  }) => Object.setPrototypeOf({
    ref,
    hub
  }, SubscriptionRefInternal), __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=make.mjs.map