import { Effect, Option } from "effect";
import { fetchJsonOption } from "../../../share/request.js";
export function evaluateInitial(initial, cel, context) {
  return Effect.gen(function* () {
    let json = Option.none();
    if (initial.request) {
      json = yield* fetchJsonOption(yield* cel(initial.request, context));
    }
    return yield* cel(initial.data, { ...context, json });
  });
}
