import type { Img2MeshRequest, Img2MeshResult, MeshProviderAdapter } from "../types.js";

/**
 * Stub MeshProviderAdapter for interface tests.
 *
 * Characters are produced by the code-drawn pipeline (`runPipeline` /
 * `pnpm harness`), not by an external mesh API. This mock remains so anything
 * still typed against `MeshProviderAdapter` has a configured stand-in.
 */
export class MockMeshProvider implements MeshProviderAdapter {
  readonly name = "mock" as const;

  constructor(private readonly placeholderGlbPath = "assets/placeholder/character.glb") {}

  isConfigured(): boolean {
    return true;
  }

  async generate(request: Img2MeshRequest): Promise<Img2MeshResult> {
    return {
      glbPath: this.placeholderGlbPath,
      provider: "mock",
      triangleCount: request.targetTriangles ?? 900,
      generationSeconds: 0,
    };
  }
}
