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

import { Ok, Err, Some, None, type Result, type Option, type ValidationError } from "./runtime.js";

export interface Money {
  readonly cents: number;
  readonly currency: string;
}

export const Money = {
};

export function total(m: Money): number {
  return m.cents;
}

export function relabel(m: Money): Money {
  return { cents: m.cents, currency: "USD" };
}

export interface Clock {
  now(): Promise<number>;
}

export const ClockToken: unique symbol = Symbol("Clock");

export const api = {
  async call(deps: { Clock: Clock }): Promise<number> {
    const t = await deps.Clock.now();
    return t;
  },
};

export interface ShopDeps {
  readonly Clock: Clock;
}

export function makeSurface(deps: ShopDeps) {
  return {
    async api(): Promise<number> {
      return api.call(deps);
    },
  };
}

