const fileName_1 = "(@effect/core) _src/io/Schedule/operations/provideService.ts";
import * as tsplus_module_1 from "@effect/core/io/Effect/operations/provideEnvironment";
import * as tsplus_module_2 from "@effect/core/io/Effect/operations/environmentWithEffect";
import { makeWithState } from "@effect/core/io/Schedule/operations/_internal/makeWithState";
/**
 * Returns a new schedule with the single service it requires provided to it.
 * If the schedule requires multiple services use `provideEnvironment`
 * instead.
 *
 * @tsplus fluent ets/Schedule provideService
 * @tsplus fluent ets/Schedule/WithState provideService
 */

export function provideService_(self, tag, service) {
  return makeWithState(self._initial, (now, input, state) => tsplus_module_2.environmentWithEffect(env => tsplus_module_1.provideEnvironment_(self._step(now, input, state), () => env.add(tag, service()), fileName_1 + ":22:30"), fileName_1 + ":19:35"));
}
/**
 * Returns a new schedule with the single service it requires provided to it.
 * If the schedule requires multiple services use `provideEnvironment`
 * instead.
 *
 * @tsplus static ets/Schedule/Aspects provideService
 */

export const provideService = (tag, service) => self => provideService_(self, tag, service);
//# sourceMappingURL=provideService.mjs.map