// Generated by bynkc — do not edit by hand.
// context demo

import { Ok, Err, Some, None, type Result, type Option, type ValidationError, type JsonValue, type BoundaryError, type ServiceBinding, callService, boundaryError } from "../../runtime.js";

export interface Logger {
  info(message: string): Promise<void>;
}

export const LoggerToken: unique symbol = Symbol("Logger");

export interface Greeter {
  greet(): Promise<void>;
}

export const GreeterToken: unique symbol = Symbol("Greeter");

export class ConsoleLogger implements Logger {
  async info(message: string): Promise<void> {
    return undefined;
  }
}

export const ConsoleLoggerProvider = { token: LoggerToken, factory: () => new ConsoleLogger() };

export class PoliteGreeter implements Greeter {
  constructor(private deps: { Logger: Logger }) {}
  async greet(): Promise<void> {
    const __r0 = await this.deps.Logger.info("hello");
    return undefined;
  }
}

export const PoliteGreeterProvider = { token: GreeterToken, factory: (deps: any) => new PoliteGreeter(deps) };

export const hello = {
  async call(deps: { Greeter: Greeter }): Promise<void> {
    const __r0 = await deps.Greeter.greet();
    return undefined;
  },
};

