// 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 A {
  a(): Promise<void>;
}

export const AToken: unique symbol = Symbol("A");

export interface B {
  b(): Promise<void>;
}

export const BToken: unique symbol = Symbol("B");

export interface C {
  c(): Promise<void>;
}

export const CToken: unique symbol = Symbol("C");

export class CImpl implements C {
  async c(): Promise<void> {
    return undefined;
  }
}

export const CImplProvider = { token: CToken, factory: () => new CImpl() };

export class BImpl implements B {
  constructor(private deps: { C: C }) {}
  async b(): Promise<void> {
    const __r0 = await this.deps.C.c();
    return undefined;
  }
}

export const BImplProvider = { token: BToken, factory: (deps: any) => new BImpl(deps) };

export class AImpl implements A {
  constructor(private deps: { B: B }) {}
  async a(): Promise<void> {
    const __r0 = await this.deps.B.b();
    return undefined;
  }
}

export const AImplProvider = { token: AToken, factory: (deps: any) => new AImpl(deps) };

export const run = {
  async call(deps: { A: A }): Promise<void> {
    const __r0 = await deps.A.a();
    return undefined;
  },
};

