import * as tsplus_module_1 from "@tsplus/stdlib/collections/SortedMap/empty";
import * as tsplus_module_2 from "@tsplus/stdlib/collections/Chunk/single";
import * as tsplus_module_3 from "@tsplus/stdlib/collections/SortedMap/set";
import * as tsplus_module_4 from "@tsplus/stdlib/collections/Collection/functions";
import * as tsplus_module_5 from "@effect/core/stm/TRef/operations/make";
import * as tsplus_module_6 from "@effect/core/stm/STM/operations/map";
import { InternalTPriorityQueue } from "@effect/core/stm/TPriorityQueue/operations/_internal/InternalTPriorityQueue";
/**
 * Makes a new `TPriorityQueue` initialized with provided `Collection`.
 *
 * @tsplus static ets/TPriorityQueue/Ops from
 */

export function from(ord) {
  return data => tsplus_module_6.map_(tsplus_module_5.make(() => tsplus_module_4.reduce_(data(), tsplus_module_1.empty(ord), (map, a) => tsplus_module_3.set_(map, a, tsplus_module_2.single(a)))), map => new InternalTPriorityQueue(map));
}
//# sourceMappingURL=from.mjs.map