import * as tsplus_module_1 from "@tsplus/stdlib/collections/Chunk/isEmpty";
import * as tsplus_module_2 from "@effect/core/stream/Channel/operations/unit";
import * as tsplus_module_3 from "@effect/core/stream/Channel/operations/write";
import * as tsplus_module_4 from "@effect/core/stream/Channel/operations/succeed";
import * as tsplus_module_5 from "@effect/core/stream/Channel/operations/flatMap";
import { StreamInternal } from "@effect/core/stream/Stream/operations/_internal/StreamInternal";
/**
 * Creates a stream from a `Chunk` of values.
 *
 * @tsplus static ets/Stream/Ops fromChunk
 */

export function fromChunk(chunk, __tsplusTrace) {
  return new StreamInternal(tsplus_module_5.flatMap_(tsplus_module_4.succeed(chunk), chunk => tsplus_module_1.isEmpty(chunk) ? tsplus_module_2.unit : tsplus_module_3.write(() => chunk)));
}
//# sourceMappingURL=fromChunk.mjs.map