import * as tsplus_module_1 from "@effect/core/io/Effect/operations/flatMap";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/suspendSucceed";
/**
 * Runs `onTrue` if the result of `self` is `true` and `onFalse` otherwise.
 *
 * @tsplus static ets/Effect/Ops ifEffect
 */

export function ifEffect(b, onTrue, onFalse, __tsplusTrace) {
  return tsplus_module_2.suspendSucceed(() => tsplus_module_1.flatMap_(b(), b => b ? onTrue() : onFalse(), __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=ifEffect.mjs.map