1import * as Config from "effect/Config";
2import * as Effect from "effect/Effect";
3import Events from "./Events.ts";
4import { ai } from "./ai/index.ts";
5import { forms } from "./forms/index.ts";
6
7export const features = Effect.gen(function* () {
8 yield* Events;
9 const enableAI = yield* Config.String("NEON_EXAMPLE_AI").pipe(
10 Config.withDefault("false"),
11 );
12 const enableForms = yield* Config.String("NEON_EXAMPLE_FORMS").pipe(
13 Config.withDefault("false"),
14 );
15 return {
16 ai: enableAI === "true" ? yield* ai : undefined,
17 forms: enableForms === "true" ? yield* forms : undefined,
18 };
19});